this filter
is on the WordPress Codex â¦Â
add_filter('excerpt_more', 'new_excerpt_more');
function new_excerpt_more($more) {
global $post;
return '<a class="moretag" href="'. get_permalink($post->ID) . '"> … </a>';
}
This works perfect, however I wonder if it is also possible to create a filter that extends the_excerpt()
with the same parameter like the_content()
where it is possible to set the “more-link-text” as parameter?
So I wonder how I can achieve this â¦
`the_excerpt(‘custom more link’)“
This would be especially useful for me because I have multiple custom-post-types where I always use the_excerpt()
as teasers. Since those custom-post-types have various contexts and meanings it would be nice to have different “more-links” at the end â¦
Is this somehow possible?
Thank you in advance!
You can use
get_post_type