Title: Does it support Template file
Last modified: August 20, 2016

---

# Does it support Template file

 *  [dipaksaraf](https://wordpress.org/support/users/dipaksaraf/)
 * (@dipaksaraf)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/does-it-support-template-file/)
 * 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/](http://wordpress.org/extend/plugins/wpgeocode/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [benizioni](https://wordpress.org/support/users/benizioni/)
 * (@benizioni)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/does-it-support-template-file/#post-3173936)
 * I also need to code into the template file, are there any solutions please?
 *  [ivanxiang](https://wordpress.org/support/users/ivanxiang/)
 * (@ivanxiang)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/does-it-support-template-file/#post-3173937)
 * I also need to know how to do this please!
 *  Thread Starter [dipaksaraf](https://wordpress.org/support/users/dipaksaraf/)
 * (@dipaksaraf)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/does-it-support-template-file/#post-3173938)
 * 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
 *  [darkhorse20](https://wordpress.org/support/users/darkhorse20/)
 * (@darkhorse20)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/does-it-support-template-file/#post-3173945)
 * 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](http://codex.wordpress.org/Function_Reference/do_shortcode)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Does it support Template file’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wpgeocode_8e8a86.svg)
 * [WP Geocode Filter](https://wordpress.org/plugins/wpgeocode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpgeocode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpgeocode/)
 * [Active Topics](https://wordpress.org/support/plugin/wpgeocode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpgeocode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpgeocode/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [darkhorse20](https://wordpress.org/support/users/darkhorse20/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/does-it-support-template-file/#post-3173945)
 * Status: not resolved