Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi @viorelepuran,

    You require the following filter to allow excerpts maintain shortcodes:

    apply_filters( 'the_seo_framework_allow_excerpt_shortcode_tags', '__return_true' );
    

    So for example: hing... becomes [cap]T[/cap]hing....

    Unfortunately, that would leave the shortcode as-is in the description, so you’ll need a second filter to execute it:

    apply_filters( 'the_seo_framework_do_shortcodes_in_description', '__return_true );
    

    So [cap]T[/cap]hing becomes <span>T</span>hing.

    Finally and automatically, all HTML the shortcode generates will automatically be removed. So, for example: <span>T</span>hing becomes Thing.

    To reiterate, add this to your (child-)theme’s function.php file:

    apply_filters( 'the_seo_framework_allow_excerpt_shortcode_tags', '__return_true' );
    apply_filters( 'the_seo_framework_do_shortcodes_in_description', '__return_true );
    

    I hope this was somewhat clear enough ?? But if you still have questions, feel free to ask!

Viewing 1 replies (of 1 total)
  • The topic ‘Description Shortcode’ is closed to new replies.