WordPress.org

Ready to get started?Download WordPress

Forums

Parameter for the_excerpt() to customize "Continue Reading -->" text? (1 post)

  1. PaulMorris
    Member
    Posted 2 years ago #

    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 the_excerpt() as well?

    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 the_excerpt("", true).

    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,
    -Paul

Topic Closed

This topic has been closed to new replies.

About this Topic