Title: conditional themplate shortcodes
Last modified: August 21, 2016

---

# conditional themplate shortcodes

 *  [rrrnnn](https://wordpress.org/support/users/rrrnnn/)
 * (@rrrnnn)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/conditional-themplate-shortcodes/)
 * hey all, working with this plugin to output a php include that depends on the
   country code, i’ve set up the conditional shortcodes that output text dependant
   on location, but can’t take that to the next level to include a php file:
 *     ```
       <? echo do_shortcode('[wpgc_is_country_code country_code="UK"]' . 'hello' .'[/wpgc_is_country_code]');?>
       ```
   
 * this outputs “hello”, but i’d like it to inlcude a php file. i’ve tried this:
 *     ```
       <? echo do_shortcode('[wpgc_is_country_code country_code="UK"]' . 'include('include/UK.php') .'[/wpgc_is_country_code]');?>
       ```
   
 * but its not working, the output is blank, where am i going wrong in the “include”
   portion of things? (i’ve also tried using the “get_template_part” function with
   no luck)
 * thanks in advance!
 * [http://wordpress.org/plugins/wpgeocode/](http://wordpress.org/plugins/wpgeocode/)

The topic ‘conditional themplate shortcodes’ 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/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 0 replies
 * 1 participant
 * Last reply from: [rrrnnn](https://wordpress.org/support/users/rrrnnn/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/conditional-themplate-shortcodes/)
 * Status: not resolved