• So I have the basic code working – it works great.

    But my question now is that i have two pieces of content: one for Canada only and one for everyone else. I dont’ want Canadians to see the ‘everyone else’ content, and don’t want everyone else to see the Canadian content.

    So how would I show this content?

    Currently i have:

    [CBC country=”ca” show=”y”]Shows in canada[/CBC]
    [CBC country=”ca” show=”n”]Should show to rest of world??[/CBC]

    But the second shortcode doesn’t seem to work. I’m in Canada, so I know the first one shows, but any test i can do with proxies in the US or UK, neither of the codes show up.

    Am i missing something? Should this work, and my proxy servers just break it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try
    1.
    [CBC show=”y” country=”ca”] instead of
    [CBC country=”ca” show=”y”]

    2.
    enabling Custom Content By Country in its setting page (not enabled by default). turn off developer setting.

    This works for me:

    [CBC show=”y” country=”au”] content here
    [/CBC][CBC show=”y” country=”se”]
    content here
    [/CBC][CBC show=”y” country=”cn”]
    content here
    [/CBC][CBC show=”y” country=”in”]
    Hello India
    [/CBC][CBC show=”y” country=”us”]
    content here
    [/CBC][CBC show=”n” country=”cn, au, us, se, in”]
    content here
    [/CBC]
    Email us: [contact-form-7 id=”2052″ title=”Contact form 1″]

    • This reply was modified 7 years, 5 months ago by michael.
    • This reply was modified 7 years, 5 months ago by michael.

    Dear Mvandiermen,

    I am also facing difficulties with this plugin…

    My test page is : https://www.studyoftexts.com/levinas

    The custom content that is to appear is located towards the end of the page, under the big price mention in dollars. Under it there should be a para with the display of the equivalent amount in the local currency of the user.

    Here is my code

    [CBC show="y" country=“at,be,cy,ee,fi,fr,de,gr,ie,it,lv,lt,lu,mt,nl,pt,sk,si,es“]equivalent to
    <strong> 49.00 €</strong> or more
    in your location[/CBC]
    [CBC show="y" country=“au“]equivalent to
    <strong> A$ 74.00</strong> or more
    in your location[/CBC]
    [CBC show="y" country=“br“]equivalent to
    <strong> R$ 189.00</strong> or more
    in your location[/CBC]
    [CBC show="y" country=“gb“]equivalent to
    <strong> £ 44.00</strong> or more
    in your location[/CBC]
    [CBC show="y" country=“ca“]equivalent to
    <strong> C$ 74.00</strong> or more
    in your location[/CBC]
    [CBC show="y" country=“cl“]equivalent to
    <strong> CLP$ 39.00</strong> or more
    in your location[/CBC]
    [CBC show="y" country=“cn“]equivalent to
    <strong> 399.00 ¥</strong> or more
    in your location[/CBC]
    [CBC show="y" country="us"]name your price ![/CBC]

    The result is quite unreliable… Works in France well, works in the US also… but the other countries tagged here either show the line for the US, or no line at all… including a strange behaviour with the line for the Euro-zone countries : the code that lists for instance together France and Italy, works in France but not in Italy… !

    I have gotten those results by testing on proxy sites for each of these countries, and also by asking friends who live in those different countries to check.

    Would you be able to notice any mistake in my coding ? Maybe too many codes ?

    Is it perhaps, that for every clause with show="y" for country X, I should add the same code with show="n" for all countries but X, even if those countries have their own code show="y" …?

    I have set the plugin settings as you suggested.

    I also tested the same codes with the alternative plugin “Country Filter”, which uses a very similar shortcodes, and there too, irregular results : working in a few countries, and not in most.

    Thanks for your help !

    Samuel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code for show to all countries but one?’ is closed to new replies.