Black Friday sale! Get 25% off WPSP Pro! Discount automatically applied at checkout.

[Support request] Using manual excerpt with rich text

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Using manual excerpt with rich text

  • This topic has 7 replies, 3 voices, and was last updated 4 years ago by Tom.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #814
    Randall
    Participant

    Thanks for a great plugin.

    I’m hoping to use manually entered excerpts that contain hyperlinks. So two questions:

    –Is it possible to have the plugin pick up a the manual excerpt (if it is set) before falling back to the generated excerpt?

    –Is it possible to have the plugin not strip html from the excerpt? I tried deleting $text = strip_shortcodes( $text ); as suggested elsewhere in this forum, but to no avail. I’m using the plugin Rich text excerpts to add the links.

    #816
    Tom
    Keymaster

    Hi there,

    1. Good idea – I have the next update almost ready to go, I’ll bake this in before releasing.

    2. Not really – the point in excerpts is for the HTML to be stripped. In this next version, the excerpts use the wp_trim_words() function – not sure if there’s a filter in there you can use?

    Thanks again for the idea on #1, I’ll be sure to add it 🙂

    #819
    Randall
    Participant

    Hi Tom,

    Cool! Wouldn’t you want to use the same behavior as the_excerpt ? That’s what I was hoping for– i.e. the WordPress default behavior where HTML in the manual excerpt is preserved.

    Thanks!

    #825
    Tom
    Keymaster

    I would want to, the issue there is you need to use a filter to edit the excerpt length, and editing that filter would also edit it for any other the_excerpt() function in the theme you’re using.

    If I find a way to make it only apply to WPSP, I’ll definitely switch over to the_excerpt().

    #1024
    Amy
    Participant

    Hi Tom:

    Was wondering if using the manual excerpt when present is still going to be included in the next update?

    Thanks !!!

    Amy

    #1025
    Tom
    Keymaster

    Just played with this a bit and think I have it working: https://github.com/tomusborne/WP-Show-Posts/commit/bb64b8886a7ae61181a0e5d550bd30f7831028c3

    You can grab the entire function here and replace it with the one on your site: https://github.com/tomusborne/WP-Show-Posts/blob/master/inc/functions.php#L5-L31

    Let me know 🙂

    #1029
    Amy
    Participant

    Awesome ! It works perfect !!! Thanks Tom !!! 🙂

    #1035
    Tom
    Keymaster

    No problem!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.