Support » Plugin: GeoTargeting Lite - WordPress Geolocation » Cant use Geot Shortcodes In PHP

  • Hello,

    I just installed and I am trying to use short codes in my PHP header.
    This is what I am testing it as;
    <?php echo do_shortcode(‘[geot country=”Argentina”] Messi is the best! [/geot]’);?>

    When saving I am getting this error:

    Parse error: syntax error, unexpected ‘country’ (T_STRING), expecting ‘]’ in /www/htdocs/w014cd8tf/mywebsite.com/assets/themes/custom/header.php on line 57

    I am currently putting the code here;

    <div id="header-contact">
    				<?php echo do_shortcode(‘[geot country=”Argentina”] Messi is the best! [/geot]’);?>
                    <a class="button" href="<?php echo get_option('eco_getquote_link'); ?>"><?php echo get_option('eco_getquote_text'); ?></a>
    			
    </div>

    Am i doing something wrong?

Viewing 1 replies (of 1 total)
  • Plugin Author Damian

    (@timersys)

    No that I can see. MAybe it’s a weird encoding issue. Be careful with ” and ‘:
    <?php echo do_shortcode('[geot country="Argentina"] Messi is the best! [/geot]');?>

    Premium version does include PHP api functions

Viewing 1 replies (of 1 total)
  • The topic ‘Cant use Geot Shortcodes In PHP’ is closed to new replies.