Title: Conditional nesting logic fail!
Last modified: August 22, 2016

---

# Conditional nesting logic fail!

 *  Resolved [petehawk](https://wordpress.org/support/users/petehawk/)
 * (@petehawk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/conditional-nesting-logic-fail/)
 * Hi,
 * I’m struggling!
 * Scenario. I have a global company website but the Australian division uses a 
   different logo which I want to use instead of the UK/Global one when the visitor
   is viewing from Australia.
 * So I need to say “If the visitor’s country is Australia echo the short code for
   the Aus logo” else “echo the short code for the UK/Global logo”
 * My brain is refusing to let me into the code for this. Any help appreciated (
   apart from telling me the Australian company should change their logo!)
 * Thanks
 * Pete
 * [https://wordpress.org/plugins/custom-content-by-country/](https://wordpress.org/plugins/custom-content-by-country/)

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

 *  Plugin Author [Paul](https://wordpress.org/support/users/paultgoodchild/)
 * (@paultgoodchild)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/conditional-nesting-logic-fail/#post-5319205)
 * Hey Pete!
 * You should try programming the logic – it’s even more fun!
 * So, failing the hope that the company wont change their logos, you’ll want something
   like:
 * `[CBC show="y" country="au"] AU Company Logo [/CBC]`
 * `[CBC show="n" country="au"] Global/UK Company Logo [/CBC]`
 * I **think** this is what you’ll want… let me know 🙂
 * Cheers,
    Paul.
 *  Thread Starter [petehawk](https://wordpress.org/support/users/petehawk/)
 * (@petehawk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/conditional-nesting-logic-fail/#post-5319241)
 * By George…
 * Fabulous.. that’s it.. so simple….
 * Thanks Paul
 *  Plugin Author [Paul](https://wordpress.org/support/users/paultgoodchild/)
 * (@paultgoodchild)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/conditional-nesting-logic-fail/#post-5319262)
 * Happy to help Pete! 😀
 * Cheers!
    Paul.
 * P.S. If ya find this plugin useful, would you be willing to leave us a glowing
   review? 😉
 *  Plugin Author [Paul](https://wordpress.org/support/users/paultgoodchild/)
 * (@paultgoodchild)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/conditional-nesting-logic-fail/#post-5319265)
 * Thanks for the review Pete, really appreciate it! 🙂
 *  Thread Starter [petehawk](https://wordpress.org/support/users/petehawk/)
 * (@petehawk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/conditional-nesting-logic-fail/#post-5319266)
 * Thanks for the plugin!
 * Pete

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

The topic ‘Conditional nesting logic fail!’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-by-country.svg)
 * [Custom Content by Country (by Shield Security)](https://wordpress.org/plugins/custom-content-by-country/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-content-by-country/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-by-country/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-by-country/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-by-country/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-by-country/reviews/)

## Tags

 * [conditional statement](https://wordpress.org/support/topic-tag/conditional-statement/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 5 replies
 * 2 participants
 * Last reply from: [petehawk](https://wordpress.org/support/users/petehawk/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/conditional-nesting-logic-fail/#post-5319266)
 * Status: resolved