More
    HomeDesign / DevHow 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 -
    WPTidBits
    WPTidBitshttps://wptidbits.com/
    Owner of WPTidBits. Totally in love with WordPress!

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    110FansLike
    761FollowersFollow