Topic: Change read more link | WP Masonry Layout

Change read more link

Home Forums Pro Version Change read more link

This topic contains 3 replies, has 2 voices, and was last updated by  Masonry Guy 3 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16960 Reply

    Debbie Campbell

    How do I change the read more link in Makalu from […] to Read More?

    #16971 Reply

    Masonry Guy
    Keymaster

    Hi Debbie,

    Here we use the default settings set by wordpress. However, it is possible to change with some filters. You can keep this code in your functions.php to change it.

    function new_excerpt_more($more) {
           global $post;
    	return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read More</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more')

    For details, you can check this wordpress document as well. https://codex.wordpress.org/Customizing_the_Read_More

    Thanks

    #17024 Reply

    Debbie Campbell

    This code snippet makes the site crash, but I have one of my own to use for this. I was just wondering if it were possible to change the Read More just for posts displayed with Masonry shortcodes.

    #17025 Reply

    Masonry Guy
    Keymaster

    Hi Debbie,

    Sorry about the issue. I missed the semi colon there. Can you please use this ?

    function new_excerpt_more($more) {
           global $post;
    	return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read More</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Change read more link
Your information: