• Resolved idanfasd

    (@idanfasd)


    Hello,

    I am using your plugin to show different products list to different countries.

    [geoip_detect2_show_if country="GB"]
    Products list
    [/geoip_detect2_show_if]
    [geoip_detect2_show_if country="EU"]
    Products list
    [/geoip_detect2_show_if]

    If the visitor is not from GB nothing shown.. there is any ” else ” to the ” if ” function? How I set default content?

    Another thing, there is an option to show the same content for all of Europe instead of mention all countries? I tried EU but it’s shows nothing. or ISO 3166 code for all countries that I didn’t mention?

    Stay safe

    • This topic was modified 6 years, 1 month ago by idanfasd.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Benjamin Pick

    (@benjaminpick)

    
    [geoip_detect2_show_if country="DE,FR,GB"]
    Products list
    [/geoip_detect2_show_if]
    

    works. Also, you can match the custom property:

    [geoip_detect2_show_if property="country.isInEuropeanUnion" property_value="1"]Products list for EU[/geoip_detect2_show_if]

    Else is not possible. However, you can use the contrary:

    [geoip_detect2_show_if property="country.isInEuropeanUnion" not_property_value="1"]Products list for EU[/geoip_detect2_show_if]

    Thread Starter idanfasd

    (@idanfasd)

    Hey, Thanks for the answer.

    hide_if worked for me as well, awesome plugin!

    [geoip_detect2_hide_if country="DE,FR,GB"]
    Products list
    [/geoip_detect2_hide_if]

    Then all other countries that not from the list will get this content.
    I will try to use ‘property’ instead of listing. thanks

    Hiya!
    So I have a similar issue. It always shows EUR Zone, eventhough I am in India at the moment.
    I am using Siteground as a Host, Siteground Cache Optimizer Plug In, the Page with the Shortcodes is excluded from caching and am using the below codes to create a button that links to different pages based on location.

    [geoip_detect2_show_if country=”IN”][et_pb_button admin_label=”Button” button_url=”LINK” url_new_window=”off” button_text=”BUTTON TEXT” button_alignment=”left” background_layout=”light”][/geoip_detect2_show_if]

    [geoip_detect2_show_if country=”US,MX,CA”][et_pb_button admin_label=”Button” button_url=”LINK2″ url_new_window=”off” button_text=”BUTTON TEXT” button_alignment=”left” background_layout=”light”][/geoip_detect2_show_if]

    [geoip_detect2_show_if country=”GB”][et_pb_button admin_label=”Button” button_url=”LINK3″ url_new_window=”off” button_text=”BUTTON TEXT” button_alignment=”left” background_layout=”light”][/geoip_detect2_show_if]

    [geoip_detect2_show_if country=”AU”][et_pb_button admin_label=”Button” button_url=”LINK4″ url_new_window=”off” button_text=”BUTTON TEXT” button_alignment=”left” background_layout=”light”][/geoip_detect2_show_if]

    [geoip_detect2_hide_if country=”IN,US,GB, MX,CA,AU”][et_pb_button admin_label=”Button” button_url=”LINK5″ url_new_window=”off” button_text=”BUTTON TEXT” button_alignment=”left” background_layout=”light”][/geoip_detect2_hide_if]

    Can you help?

    Thanks!
    Iris

    • This reply was modified 5 years, 10 months ago by iriszajac.
    • This reply was modified 5 years, 10 months ago by iriszajac.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Shortcodes “else”’ is closed to new replies.