Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Damian

    (@timersys)

    You can only use shortcodes to do that

    // Only Argentina users will see content
    [geot country=”Argentina”] Messi is the best! [/geot]

    // Everyone except for argentina will see the content
    [geot exclude=”Argentina”] Messi is the best! [/geot]

    Hi Damian,

    I noted one tiny issue when using this shortcode on my blog page: even though all the content between [geot country=”COUNTRY CODE”] and [/geot] is not visible anymore on my blog page, the title of the article and the featured picture remain visible.

    When shortcode is used on one of my article, it only shows a title + an image (with no content, which is removed by shortcode).

    Question: How do I get the shortcode to include the title of my article + featured image?

    Plugin Author Damian

    (@timersys)

    You will have to modify you theme template and add shortcode directly in php. Something like

    <?php echo do_shortcode( ‘[geot_target country=”US”] ‘ . get_the_title() . ‘[/geot_target]’);?>

    Untested but should be something like that

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Geotargeting pages and posts’ is closed to new replies.