Title: Shortcode execution in post excerpt
Last modified: January 24, 2018

---

# Shortcode execution in post excerpt

 *  [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * (@benjaminniess)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/shortcode-execution-in-post-excerpt/)
 * Hi,
 * It seems that when we call a post preview with Timber…
 * `{{ post.preview.read_more('') }}`
 * … shortcodes are parsed, executed and stripped. In WordPress native get_the_excerpt
   function, shortcodes are stripped with strip_shortcode function ([https://codex.wordpress.org/Function_Reference/strip_shortcodes](https://codex.wordpress.org/Function_Reference/strip_shortcodes))
 * If we want to respect WordPress excerpt behavior, it would be better to strip
   them or at least to have a filter to stip them.
 * It seems to be in this file :
    [https://github.com/timber/timber/blob/f1fdbeb73eb897d227fda01b65da685abaeba830/lib/PostPreview.php#L145](https://github.com/timber/timber/blob/f1fdbeb73eb897d227fda01b65da685abaeba830/lib/PostPreview.php#L145)
 * Thanks for your help.
    Best,

Viewing 1 replies (of 1 total)

 *  [Lukas G.](https://wordpress.org/support/users/gchtr/)
 * (@gchtr)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/shortcode-execution-in-post-excerpt/#post-9928367)
 * Would you mind creating an issue for this on Github ([https://github.com/timber/timber/issues](https://github.com/timber/timber/issues))?
   It’s easier for us to track issues there.

Viewing 1 replies (of 1 total)

The topic ‘Shortcode execution in post excerpt’ is closed to new replies.

 * ![](https://ps.w.org/timber-library/assets/icon-256x256.png?rev=1482054)
 * [Timber](https://wordpress.org/plugins/timber-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timber-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timber-library/)
 * [Active Topics](https://wordpress.org/support/plugin/timber-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timber-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timber-library/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Lukas G.](https://wordpress.org/support/users/gchtr/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/shortcode-execution-in-post-excerpt/#post-9928367)
 * Status: not resolved