• Hi there

    I want to show content based on one country, and then if the user is from any other country in the world, I would like to show them the default content. But not both at the same time.

    How can I set up an if/then statement?

    Regards
    Steve

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Paul

    (@paultgoodchild)

    You don’tneed an if else, just 2x separate shortcodes, one that shows the content, the other than doesn’t.

    [CBC show="y" country="..." ] ... [/CBC]
    
    [CBC show="n" country="..." ] ... [/CBC]

    Would this work for you?

    yes Paul but what if we wanted to use an if then statement rather than plugging in hundreds and hundreds of countries? Could an if/then statement be used?

    • This reply was modified 8 years, 3 months ago by wordp-TB.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘if then statement – show content for one country and show other content for all’ is closed to new replies.