More
    Home Design / Dev How to Remove the from WordPress excerpt

    How to Remove the [..] from WordPress excerpt

    Some WordPress theme by default are using excerpt instead of full post to display post list on Homepage. Do you ever wonder why the the_excerpt() function displaying […] at the end of the post excerpt? We don’t find this beautiful to see. Let us see how to remove it.

    Simply paste the following function in the functions.php file in your theme:

    - Advertisement -

    [php]

    function trim_excerpt($text) {

    return rtrim($text,'[…]’);

    - Advertisement -

    }

    add_filter(‘get_the_excerpt’, ‘trim_excerpt’);

    [/php]

     

    Done!

     

    Thanks to WPRecipes

    - Advertisement -
    Avatar
    WPTidBitshttps://wptidbits.com/
    Owner of WPTidBits. Totally in love with WordPress!

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here
    READ ALSO:  A Comparison of Wordpress and Joomla

    110FansLike
    761FollowersFollow

    You May Also Like