WordPress.org

Forums

WP Geocode Filter
Does it support Template file (5 posts)

  1. dipaksaraf
    Member
    Posted 2 years ago #

    I am trying to use the shortcode in the template file using the following code:

    <?php do_shortcode( '[wpgc_is_country_name country_names="United States,Canada"]' ); ?>
    Some Content here
    <?php do_shortcode( '[/wpgc_is_country_names]' ); ?>
    
    But it seems that it is not working, Can you suggest how to use it in theme template file.
    
    Thanks
    Dipak

    http://wordpress.org/extend/plugins/wpgeocode/

  2. benizioni
    Member
    Posted 2 years ago #

    I also need to code into the template file, are there any solutions please?

  3. ivanxiang
    Member
    Posted 2 years ago #

    I also need to know how to do this please!

  4. dipaksaraf
    Member
    Posted 2 years ago #

    The PHP code does'nt work even though I have tried it several time, but the shortcodes will work fine in any page/post widgets which may add and it is working fine for me.

    Dipak

  5. darkhorse20
    Member
    Posted 1 year ago #

    You are forgetting to put "echo" your code. It should look like this:

    <?php echo do_shortcode( '[wpgc_is_country_name country_names="United States,Canada"]' ); ?>
    Some Content here
    <?php echo do_shortcode( '[/wpgc_is_country_names]' ); ?>

    http://codex.wordpress.org/Function_Reference/do_shortcode

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic