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.www.ads-software.com/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#L145Thanks for your help.
Best,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Shortcode execution in post excerpt’ is closed to new replies.