Quantcast
Viewing all articles
Browse latest Browse all 134382

liarandathief on "excerpt_more filter not working when there is a tag in the post."

My template uses the_excerpt() on the home page. I'm also using a custom filter:

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

If the post doesn't have a <!--more--> tag in the body, it display correctly. If it does have the tag, the post copy before the tag is shown, but my custom filter doesn't run.


Viewing all articles
Browse latest Browse all 134382

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>