Title: Shortcode &amp; Excerpt
Last modified: February 29, 2020

---

# Shortcode & Excerpt

 *  Resolved [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/)
 * Hi,
    Get the impression that not only the [wiki] shortcodes are stripped from
   the_excerpt, but also the text in between. I’m using WP 5.3.2 with WP WT 1.9.1
   on PHP 7.4. Happens with themes like Blocksy, Astra and Weaver Xtreme. Can create
   an example.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/shortcode-excerpt/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-excerpt/page/2/?output_format=md)

 *  Plugin Author [Nico Danneberg](https://wordpress.org/support/users/nida78/)
 * (@nida78)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12510732)
 * I am not sure if this is not a bug of the plugin but a standard behavior of WordPress.
   I will figure out and coming back soon!
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12513097)
 * Hi Nico,
    I guess so. Before WP 5.0 image caption worked in a similar way by 
   design. Enclosed in [ ] they were filtered from the excerpt with the text in 
   between. Figcaption is now in < >.
 * Similar [plugin Wikilookup](https://wordpress.org/plugins/wikilookup/) shows 
   same behaviour. Shortcodes + text is stripped from excerpt.
 * Hope you can find a solution or workaround.
 *  Plugin Author [Nico Danneberg](https://wordpress.org/support/users/nida78/)
 * (@nida78)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12514864)
 * Ok, I just tested this scenario in my local deveopment setup once with “Twenty
   Twenty” and once with “Blocksy”. I found out that your problem is caused by the
   theme!
 * In “Twenty Twenty” everything work fine. All shortcodes are displayed even in
   excerpts pretty well. But if I switched to Blocksy the shortcodes were filtered
   out! And if I used the extra excerpt-field of a post that the shortcode was printed
   out as plain-text (the [] are shown).
 * So, my plugin has no chance to steer the behavior of the theme! I think the only
   solution is override the get_excerpt-function of the theme…
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12516456)
 * Hi, 2020 shows same behaviour. Thanks for your investigation.
    Did you work with
   [excerpts](https://drive.google.com/open?id=11tHiFyISZNo8jJ0yYPng0PM6Uzj-lEfM)
   instead of the [full text](https://drive.google.com/file/d/1Q1CCHIeJgVHi4mMhITyM2Wt-xIIj9la5/view?usp=sharing)?(
   See attached screenshots of both) Through the customizer I adjusted Theme Options
   to show excerpts on archive pages. Leaves the possibility that it can be theme
   behavior, but if even 2020 works this way …. Will use some kind of workaround
   for the time being.
    -  This reply was modified 6 years, 3 months ago by [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/).
    -  This reply was modified 6 years, 3 months ago by [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/).
 *  Plugin Author [Nico Danneberg](https://wordpress.org/support/users/nida78/)
 * (@nida78)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12517799)
 * I made this small setup that works with 2020 really fine:
 * 1) I created a [post with a shortcode](https://n1da.net/wordpress/wp-content/uploads/2020/03/tooltip-01.jpg)
   within the first 100 characters.
 * 2) I created a page where I used the [“Latest Posts”-Gutenberg Block](https://n1da.net/wordpress/wp-content/uploads/2020/03/tooltip-02.jpg)
   with option “show excerpt” enabled.
 * 3) If I visited this [page online](https://n1da.net/wordpress/wp-content/uploads/2020/03/tooltip-03.jpg)
   everything looks good!
 * All this is done with 2020! So, I do not see the problem :/
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12517818)
 * OK. Doesn’t work in my setup with 2020 on Archive pages with excerpt selected(
   as illustrated). Will not use shortcode in excerpt.
 *  Plugin Author [Nico Danneberg](https://wordpress.org/support/users/nida78/)
 * (@nida78)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12517838)
 * It’s a pitty that it doesn’t work!
 * I will hold my eyes open to perhaps see a solution later…
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12517845)
 * [https://stackoverflow.com/questions/33133953/strip-shortcode-keep-content-in-between](https://stackoverflow.com/questions/33133953/strip-shortcode-keep-content-in-between)
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12517871)
 * [https://core.trac.wordpress.org/ticket/25644](https://core.trac.wordpress.org/ticket/25644)
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12519314)
 * Hi Nico,
    I replicated your setup and created a page where I used the Latest-
   Posts-Block. Looks good on the frontend in the way that the text between [wiki]
   and [/wiki] is visible. But what strikes me, is that the tooltip even works. 
   That’s not what happens in a normal WP setup where you show excerpts of posts
   on a blog/archive/category/tag/author-page.
 * For that reason I made a few words italic and bold. These styles are not shown,
   even in your setup (using new-posts-block). So, the markup is removed and text
   stays. That’s what I would expect from the wiki tooltip as well.
 * Hope you can find a few minutes to test my setup as well. Display a blog page
   with one or several post excepts.
 * It would be great if the wiki-tagged text remains in the excerpt, but without
   the functionality itself. Just stripped of shortcode and html tags.
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12519734)
 * Hi,
    from [a similar issue on Gutenberg latest-posts-block](https://wordpress.org/support/topic/unable-to-affect-latest-posts-block/)
   in combination with a plugin (see last post by plugin author).
 * “The latest posts block does not apply any filters to the excerpt output so there’s
   unfortunately no way to modify it.
 * Which is a bit weird, WordPress generally has a filter/action that developers
   can use to modify almost anything.”
 *  Plugin Author [Nico Danneberg](https://wordpress.org/support/users/nida78/)
 * (@nida78)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12519936)
 * Are you able to modify my plugin on your server?
 * If yes please look for the file `class.wp-wiki-tooltip.php` and add this line
   of code at line 18: `add_filter( 'get_the_excerpt', 'do_shortcode' );`
 * Please tell me if this leads to the right result!
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12519958)
 * Sorry, but this doesn’t solve the issue. Thanks for the suggestion. I get a sense
   of what you were trying to accomplish (I’m not a developer).
    I [raised the issue at Github](https://github.com/WordPress/gutenberg/issues/20019#issuecomment-596134535)
   as well.
 *  Plugin Author [Nico Danneberg](https://wordpress.org/support/users/nida78/)
 * (@nida78)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12519980)
 * OK, I will wait for answers to your posts at Stackoverflow an Github!
 *  Thread Starter [mmwbadmin](https://wordpress.org/support/users/mmwbadmin/)
 * (@mmwbadmin)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/#post-12554160)
 * Issue [#20702](https://github.com/WordPress/gutenberg/issues/20702) on Github
   is now closed. Excerpts on a blog page are identical to excerpts in a latest-
   posts-block with WP 5.4 (or WP 5.3 + GB 7.7)
 * In my case without a manually created excerpt, an excerpt is created and stripped
   from its shortcodes.
 * I’m not sure whether this works OK for enclosing shortcode tags as the enclosed
   content is also stripped.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/shortcode-excerpt/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-excerpt/page/2/?output_format=md)

The topic ‘Shortcode & Excerpt’ is closed to new replies.

 * ![](https://ps.w.org/wp-wiki-tooltip/assets/icon-256x256.png?rev=1318766)
 * [WP Wiki Tooltip](https://wordpress.org/plugins/wp-wiki-tooltip/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-wiki-tooltip/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-wiki-tooltip/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-wiki-tooltip/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-wiki-tooltip/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-wiki-tooltip/reviews/)

## Tags

 * [excerpt](https://wordpress.org/support/topic-tag/excerpt/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 16 replies
 * 2 participants
 * Last reply from: [Nico Danneberg](https://wordpress.org/support/users/nida78/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/shortcode-excerpt/page/2/#post-12554242)
 * Status: resolved