I would like to suggest adding a parameter to
the_excerpt()so that you can customize the “Continue Reading –>” text from a template file, without having to deal with functions.php. You can do this with
the_content()so why not
Here’s my situation. I have a custom post type (and I use the excerpt field rather than the
<--more-->tag for it) and I wanted to not show the “Continue Reading –>” links on the archive page for those custom posts. But I did want to show it on other archive pages for regular blog posts.
It would have been really simple to edit the custom post’s archive page template to use something like
Instead it took me awhile to sort it out and figure out how to do it using functions.php. (Unregistering my parent theme’s functions, registering my own child theme function to handle it, making it conditional so it only applies to a particular archive page.)
Thanks for taking this into consideration,
- The topic ‘Parameter for the_excerpt() to customize "Continue Reading –>" text?’ is closed to new replies.