[Resolved] WP Gallery shortcode shows in post excerpt

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support WP Gallery shortcode shows in post excerpt

This topic contains 6 replies, has 2 voices, and was last updated by  Tom 2 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1528

    Lyle
    Participant

    Hi Tom.

    Just setting up a new site with GP/GP-P and WPSP (heaven forbid, I am not using a page builder with this one! LOL)

    In one post I added a standard WP gallery and all works fine. However, I notice that in the WPSP list that is displayed, it shows the WP gallery shortcode in the excerpt. Is there any way to have this not be displayed in the excerpt other that truncating the excerpt, as I have done in the meantime.

    Cheers!
    Lyle

    #1530

    Tom
    Keymaster

    Hmm, shortcodes shouldn’t display if the excerpt is set (with no more tag etc..).

    What version of WPSP are you running?

    Can you link me to the page?

    #1540

    Lyle
    Participant

    Here is the page in question:

    drawing stuff

    Version 1.0 from the WP repo, no Pro installed on this site.

    I tried the usual t/s method of deactivating all plugins except WPSP and still the same. Tried removing the Read more as well; still shows.

    #1554

    Tom
    Keymaster

    Hmm can’t duplicate this.

    For example, here’s my post: https://www.screencast.com/t/kbPF7aoZh

    And here it is on the site: https://www.screencast.com/t/ICXApRsL

    I wonder if you have a conflicting plugin?

    #1555

    Lyle
    Participant

    Yep, tried the deactivate all plugins except WPSP route, but thanks to the screencast of your post, I found out what is “going on” and I am not sure if it’s a WPSP or a WP thing.

    This is what I have on that page for the gallery, which shows the shortcode in the excerpt:

    [gallery link="file" columns="2" size="full" ids="199,198,197,196,195,194,193,192,191,190,189,188,187"]

    When I get rid of the options, and just have this, it “works”, that is, the shortcode is not displayed in the excerpt:

    [gallery ids="199,198,197,196,195,194,193,192,191,190,189,188,187"]

    Hmmm … 🙂 But I would like to use the options 🙂

    #1556

    Lyle
    Participant

    UPDATE: I bumped up the Excerpt count to 35 from the default 30 and the shortcode is gone! 🙂

    Note that before I did the above, I switched to WP 2016 (deactivated GP-P) and it was the same thing. So not sure if this is still something with WPSP, but in the meantime, it’s working for this site so I’ll mark this Resolved 🙂

    #1561

    Tom
    Keymaster

    So weird, I can’t get it to happen at all, even with all of the options.

    The function itself has a function in it to strip all shortcodes, so I’m not sure how it’s happening for you: https://github.com/tomusborne/wp-show-posts/blob/1.0/inc/functions.php#L18

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.