Adrotate Shortcode Showing in POI Excerpt

Home Forums MapPress Support Adrotate Shortcode Showing in POI Excerpt

This topic contains 1 reply, has 2 voices, and was last updated by  Chris 9 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16987

    mdp8593
    Participant

    Hi Chris. Do you have any idea why a particular shortcode is appearing in the POI excerpt, while others do not?

    Specifically, the shortcode for an Adrotate banner is showing in my POI excerpts on a mashup map.

    Here’s the first line of the Post content as viewed in the Post Editor:

    <div class="ad-left">[adrotate banner="7"]</div>

    In the POI excerpt, the div tags are stripped out, but the adrotate shortcode still shows.

    #16988

    Chris
    Keymaster

    Hi,

    If you are using the post excerpt for the POI body, I think the WordPress standard ‘excerpt’ function strips out shortcode tags. Some themes replace this with their own function which may allow the shortcodes to pass through. You could try temporarily switching to a standard theme to see if the shortcodes are stripped out – and check your ‘functions.php’ file for anything shortcode related.

    If that doesn’t help, this function can be used to strip out shortcode tags:
    https://codex.wordpress.org/Function_Reference/strip_shortcodes

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.