• 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/

  • The topic ‘conditional themplate shortcodes’ is closed to new replies.