WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content by Country (by iControlWP)
[Plugin: Custom Content by Country, from Worpit] 'Everywhere else' issues (2 posts)

  1. tammylewis
    Member
    Posted 1 year ago #

    Hello again,

    Our websites gone live, so I finally have chance to try out your plugin properly. The support guys for the theme I'm using have been less than helpful - but I've managed to find where to put the doshortcode() bit of code you suggested before.

    Basically I have:
    do_shortcode( '[CBC country="US" show="y"]US[/CBC][CBC country="us" show="n"]Everywhere Else[/CBC]' )

    The code is executing, but it is showing the US content regardless of our IP address (I've checked http://www.ip2nation.com/ip2nation, and our IP is UK). I've cleared the cache. I've even set it as the following to see if that works, but it isn't picking it up correctly..
    do_shortcode( '[CBC country="US" show="y"]US[/CBC][CBC country="gb" show="y"]Everywhere Else[/CBC]' )

    Am I doing something wrong? I can't seem to see what the problem is :(

    http://wordpress.org/extend/plugins/custom-content-by-country/

    [ Please do not bump, that's not permitted here. ]

  2. Paul G.
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    As I posted to another user a few minutes ago: I have reviewed the code, done a lot of testing with show=y and show=n and manually set country codes etc., but I haven't been able to replicate this problem.

    It works for me exactly how it's documented to.

    I have added a data tag to the output called "data-detected-country" so if you inspect the source, you'll see something like:
    data-detected-country="us" on the HTML span that will tell you the country code that the plugin detected, either from a cookie or cloudflare or from the IP address.

    Perhaps that might help in debugging it. Sorry I can't be of further assistance than that.. unless I can replicate the bug, I can't fix it.

    Thanks,
    Paul.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.