Title: Event Manager &#8211; Conditional Custom Attribute
Last modified: January 25, 2019

---

# Event Manager – Conditional Custom Attribute

 *  Resolved [pasamike](https://wordpress.org/support/users/pasamike/)
 * (@pasamike)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/event-manager-conditional-custom-attribute/)
 * I have created a custom attribute: #_ATT{Registration}
    The value will be a URL.
 * Because I do not want an empty hyperlink on any event without registrations URL,
   I need to hide the HTML if the value is blank.
 * I can get the link to display with the following:
    `<a href='#_ATT{Registration}'
   target='_blank'>Register Now!</a>`
 * The link displays / works as intended. If I use
    `{has_Registration}<a href='#
   _ATT{Registration}' target='_blank'>Register Now!</a>{/has_Registration}`
 * or
 * `{has_att_Registration}<a href='#_ATT{Registration}' target='_blank'>Register
   Now!</a>{/has_att_Registration}`
 * The link is hidden regardless of whether the value is filled or not. I know this
   has to be a simple syntax error on my part, but I can’t seem to figure this one
   out. Please Help, I’ll be your best friend! Unless you don’t want to be best 
   friends, then I’ll just play it cool and say thanks! 🙂
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fevent-manager-conditional-custom-attribute%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [undoproject](https://wordpress.org/support/users/undoproject/)
 * (@undoproject)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/event-manager-conditional-custom-attribute/#post-11136531)
 * Try without the single quotation marks.
 *  [Gerry_C](https://wordpress.org/support/users/gerry_c/)
 * (@gerry_c)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/event-manager-conditional-custom-attribute/#post-11144388)
 * [@pasamike](https://wordpress.org/support/users/pasamike/)
    This will require
   a bit of custom PHP coding as there are no conditional placeholders for custom
   attributes as standard.
 * Something based on the following thread will need to be added to eg your child
   theme functions.php. If you don’t have a child theme, there’s a bit of learning
   to do before you get to this.
 * [Conditional place holder for custom attribute](https://wordpress.org/support/topic/conditional-place-holder-for-custom-attribute/)
   
   The first coded answer should do as you want.
 * As always, it is best to test this on a staging site as it’s easy to break your
   site if you make a small mistake. Make a full backup first as well.
 * Gerry

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

The topic ‘Event Manager – Conditional Custom Attribute’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, 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/)

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [event-manager](https://wordpress.org/support/topic-tag/event-manager/)
 * [hyperlink](https://wordpress.org/support/topic-tag/hyperlink/)

 * 2 replies
 * 3 participants
 * Last reply from: [Gerry_C](https://wordpress.org/support/users/gerry_c/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/event-manager-conditional-custom-attribute/#post-11144388)
 * Status: resolved