I am trying to: On this page: hidden link
I'm trying to show registration buttons if courses are marked "Open" using a custom field.
The page above is showing courses like this one: hidden link
And is using this content template: hidden link
Here is the code I'm using:
[wpv-conditional if="( $(wpcf-bio-course-status) eq 'open' )"][types field="course-registration-url" title="Register5" class="extra-class" style="display: block; margin-top: 10px; padding: 10px 25px;background-color: #49adde; color: #fff; text-align: center;"][/types][/wpv-conditional]
You'll see the bio course status has two radio options, either open or closed. I tried several options using numbers instead of the word or using false instead of true, but can't get the buttons to show unless I remove the conditional statement.
Thanks for your help!
Hi, sorry but I didn't receive login credentials so I cannot see the custom fields in wp-admin. I don't see anything obviously wrong in the conditional, so please activate debug mode by adding debug="true" to the wpv-conditional, and let me know what is displayed:
[wpv-conditional if="( $(wpcf-bio-course-status) eq 'open' )" debug="true"][types field="course-registration-url" title="Register5" class="extra-class" style="display: block; margin-top: 10px; padding: 10px 25px;background-color: #49adde; color: #fff; text-align: center;"][/types][/wpv-conditional]
I will activate private reply fields here so you can share login credentials if you'd like.
It looks like the slug of the course status custom field is not accurate in the conditional. In the custom field editor, I see the slug is "course-status", so I think the correct conditional should be:
[wpv-conditional if="( $(wpcf-course-status) eq 'open' )"][types field="course-registration-url" title="Register5" class="extra-class" style="display: block; margin-top: 10px; padding: 10px 25px;background-color: #49adde; color: #fff; text-align: center;"][/types][/wpv-conditional]
Try that and let me know if the problem is not resolved.
Weird because I let Toolset fill that all in, but your suggestion works. Thanks much!