Title: Shortcodes &#8220;else&#8221;
Last modified: April 22, 2020

---

# Shortcodes “else”

 *  Resolved [idanfasd](https://wordpress.org/support/users/idanfasd/)
 * (@idanfasd)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-else/)
 * 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](https://wordpress.org/support/users/idanfasd/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Benjamin Pick](https://wordpress.org/support/users/benjaminpick/)
 * (@benjaminpick)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-else/#post-12778790)
 *     ```
       [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](https://wordpress.org/support/users/idanfasd/)
 * (@idanfasd)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/shortcodes-else/#post-12784874)
 * 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
 *  [iriszajac](https://wordpress.org/support/users/iriszajac/)
 * (@iriszajac)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/shortcodes-else/#post-13136016)
 * 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](https://wordpress.org/support/users/iriszajac/).
    -  This reply was modified 5 years, 10 months ago by [iriszajac](https://wordpress.org/support/users/iriszajac/).

Viewing 3 replies - 1 through 3 (of 3 total)

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

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [iriszajac](https://wordpress.org/support/users/iriszajac/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/shortcodes-else/#post-13136016)
 * Status: resolved