the_excerpt

This topic contains 2 replies, has 2 voices, and was last updated by  Rachel Druskin 9 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17043

    hi,
    when using “the_excerpt” instead of “the_content”, is there a way to replace the [..] with something else?
    thanks!

    Rachel Druskin
    #17074

    Hi Rachel,

    Please see the examples here: https://codex.wordpress.org/Function_Reference/the_excerpt, but note that changes will apply site-wide.

    If you want it to apply only to that particular instance, you might need to do a manual approach:

    //Change […] as desired:
    echo wp_trim_words( get_the_content(), 55, '[…]' );
    

    But note that the above will not parse shortcodes in the content (among other things) like the_content() does, nor will remove them like the_excerpt() does.

    Stephen Harris
    #17080

    hi Stephen,
    thank you for the quick response! ☺

    Rachel Druskin
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.