remove […] &hellip wordpress from excerpt

5.48K views
no comments
16 Nov 2016 8:37 am

The #wordpress concatenating […] in #the_excerpt and sometimes with [&hellip]; I here function defined as trim_excerpt and it passed in add_filter you can copy and put the following code in functions.php file of your current active theme.

function trim_excerpt($text){
    return rtrim(str_replace('[&hellip', '', $text), '[...]');
}
add_filter('get_the_excerpt', 'trim_excerpt');

little bit information about add_filter function

#add_filter can change modify of the data, you can customize everything which is showing from #wordpress core functions.

NOTE:Your Email Address will be not shown and please do not add spamming comments because here is REL="NOFOLLOW" on your links and comments also moderated shown.
<code>Put html css or any language code under this tag</code>