• Hi,

    How can I use this on a template?
    I’ve tried <?php echo do_shortcode("[iwg_maps]"); ?> but it doesn’t work.
    Map container shows up, but no map.

    See here: link

    It works fine with the shortcode on the content editor.

    Also, if I have both the shortcode on the content editor and on the page template PHP file, one of them works, curiously the one on the PHP file.

    Any help?

    https://ww.wp.xz.cn/plugins/ideal-interactive-map/

Viewing 1 replies (of 1 total)
  • Thread Starter rjpedrosa

    (@rjpedrosa)

    Seems it is checking for the shortcode only on the content.

    Used a workaround:

    Just remove this lines:

    if( is_a( $post, 'WP_Post' ) && !has_shortcode( $post->post_content, 'iwg_maps') )
    return false;

    But DO NOT update the plugin, otherwise that change will be overwritten.

    Not the perfect solution, but works for now.

Viewing 1 replies (of 1 total)

The topic ‘Use on template’ is closed to new replies.