Title: Switch Routing
Last modified: January 30, 2020

---

# Switch Routing

 *  [retarus](https://wordpress.org/support/users/retarus/)
 * (@retarus)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/switch-routing/)
 * Hello,
 * Great Plugin so far! I just run into a problem while trying to set up switch 
   routing. For our company we have pages like this broadcasted for different countries
   with the same language. Simply for changes to be instantly broadcasted and not
   having the need to be applied to any more pages. In this specific case I want
   the logo carousel to output only logos that have the value of the country. This
   is working fine but I got problems with the switch itself.
 * Long story short: When trying to setup switch routing the code **always** outputs
   the default condition. Is there something I have overlooked?
 * Here’s my code:
 *     ```
       [loop type=portfolio category=referenzen gallery=carousel]
       [switch route]
       	[when de/company/profile]
       		[if field=customer_logo-homepage value=de]
       			<li>[field thumbnail]</li>
       		[/if]
       	[/when]
       	[when at/company/profile]
       		[if field=customer_logo-homepage value=at]
       			<li>[field thumbnail]</li>
       		[/if]
       	[/when]
       	[when chde/company/profile]
       		[if field=customer_logo-homepage value=chde]
       			<li>[field thumbnail]</li>
       		[/if]
       	[/when]
       	[when default]
       		[if field=customer_logo-homepage value=global]
       			<li>[field thumbnail]</li>
       		[/if]
       	[/when]
       [/switch]
       [/loop]
       ```
   
 * Thanks in advance,
    Alex
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fswitch-routing%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Switch Routing’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

## Tags

 * [routing](https://wordpress.org/support/topic-tag/routing/)
 * [switch](https://wordpress.org/support/topic-tag/switch/)

 * 0 replies
 * 1 participant
 * Last reply from: [retarus](https://wordpress.org/support/users/retarus/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/switch-routing/)
 * Status: not resolved