Title: Conditional Placeholders
Last modified: August 22, 2016

---

# Conditional Placeholders

 *  Resolved [clane_workforce](https://wordpress.org/support/users/clane_workforce/)
 * (@clane_workforce)
 * [12 years ago](https://wordpress.org/support/topic/conditional-placeholders-2/)
 * I am using the conditional placeholder as shown below.
 * <h6><i>{has_location}#_LOCATIONNAME, {/has_location}{has_location}#_LOCATIONTOWN,{/
   has_location}{has_location}#_LOCATIONSTATE, {/has_location} {has_location}#_LOCATIONCOUNTRY{/
   has_location}</i></h6>
 * When there is no state it prints out the commas and blank spaces as follows.
 * Manchester Central, Manchester, , United Kingdom
 * How can I resolve this issue? Thank you in advance for your help and such a great
   plugin!
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

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

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [12 years ago](https://wordpress.org/support/topic/conditional-placeholders-2/#post-5327410)
 * maybe you can try to enclose the above placeholder to one conditional placeholder
   only instead of dividing each to multiple conditional placeholder?
 *  Thread Starter [clane_workforce](https://wordpress.org/support/users/clane_workforce/)
 * (@clane_workforce)
 * [12 years ago](https://wordpress.org/support/topic/conditional-placeholders-2/#post-5327478)
 * No the comma is still showing and on another page there is a blank line below
   the date where I’ve conditionally placed the location tags. So it is keeping 
   the HTML tags empty if no location is there.
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [12 years ago](https://wordpress.org/support/topic/conditional-placeholders-2/#post-5327501)
 * how about something like this
 *     ```
       {has_location}
        <h6> <i> #_LOCATIONNAME, #_LOCATIONTOWN, #_LOCATIONSTATE, #_LOCATIONCOUNTRY </i> </h6>
       {/has_location}
       ```
   
 * and then just use custom css for the blank lines
 *  Thread Starter [clane_workforce](https://wordpress.org/support/users/clane_workforce/)
 * (@clane_workforce)
 * [12 years ago](https://wordpress.org/support/topic/conditional-placeholders-2/#post-5327542)
 * Hi there,
 * It still prints with blank comma as below with no state:
 * Manchester Central, Manchester, , United Kingdom
 * Any help is appreciated, as others might need this fix as well. Take care:)
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [12 years ago](https://wordpress.org/support/topic/conditional-placeholders-2/#post-5327551)
 * another option is to create custom location conditional placeholder – [http://wp-events-plugin.com/tutorials/creating-conditional-placeholders-for-events/](http://wp-events-plugin.com/tutorials/creating-conditional-placeholders-for-events/)(
   change event with location)

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

 The topic ‘Conditional Placeholders’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.gif?rev=3711454)
 * [Events Manager - Calendar, Bookings, Tickets, Appointments and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/conditional-placeholders-2/#post-5327551)
 * Status: resolved