WordPress.org

Ready to get started?Download WordPress

Forums

How to get short code using plugin to work on my sites mega menu? (2 posts)

  1. Dawa1
    Member
    Posted 1 year ago #

    Hello,

    I have a plugin WP Geocode that will let me use conditional short tags based on where the visitor is coming from. However, it only works in the post area. I have a "mega menu" custom built that I am using, and it will not show the short code stuff there, even if it is within the <body> tags, it just shows the text of the short code.

    How can I get this to work in that area?

  2. Dawa1
    Member
    Posted 1 year ago #

    So I was able to figure out with some google-fu that there is a special code in WordPress as so, echo do_shortcode('[iscorrect]'.$text_to_be_wrapped_in_shortcode.'[/iscorrect]');
    Found at Function Reference/do shortcode and this seems to be what I am looking for.

    I have it working for just a single short code, but I am trying to get it to work with the closing option as well (what I have above). How can I put HTML into this?

Topic Closed

This topic has been closed to new replies.

About this Topic