Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #155610
    dcastle316
    Participant

    When I use a shortcode within my bibletruths.org posts, for example, [su_highlight]to highlight important words and phrases,[/su_highlight] the words within the shortcode are removed from the excerpt on the front page. This is particularly troublesome because those words are particularly important.

    According to the ultimate shortcodes author, this is caused by a known problem/issue/bug in wordpress. They recommend a solution that is described in this article… https://wordpress.stackexchange.com/a/185305

    Can you add this filter to the theme so these words will not be removed?

    #155672
    Skandha
    Participant

    @dcastle316: For now you will need to Create a Child Theme. If you do not know how to create child theme you can use Generate Child Theme Plugin. After creating a Child Theme Go to => Child Theme Folder => functions.php
    add the following Code.

    add_filter( 'the_excerpt', 'shortcode_unautop');
    add_filter( 'the_excerpt', 'do_shortcode');

    I will forward your suggestion to add the filter to the development team.
    Let me know if this helps you out!
    Kind Regards,
    Skandha

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Text within shortcodes removed from front page excerpts’ is closed to new replies.