In an Events Manager Form, this won´t be displayed at all, although we have "Decode Shortcode Content" activated, and "Sanitize shortcode content?" deactivated. [wpv-user field="ID"] and [wpv-post-author format="meta" meta="ID"] have correct results.
[wpv-conditional] works, but something seems to be wrong.
[wpv-conditional if="( '[wpv-user field="ID"]' eq '[wpv-post-author format="meta" meta="ID"]' )"]
<p>User is the author of the post.</p>
[/wpv-conditional]
When testing conditionals like this, one useful thing to do first is to simply output on the screen the things you are comparing, to confirm that they do output the values you expect in this context.
The if condition begins with the first double-quote, which is looking for the next double-quote to close the if condition. From left to right it finds a double quote at field="ID", closing the if condition prematurely.
Try replacing the double quotes used with the shortcode attributes (field, format, meta) with single quotes.
Hi Nigel, thank you so far.
Yes I´ve looked at the values. They are correct.
Would it REALLY close the condition, after having found ONLY ONE single quote??
Sorry for the late reply, using single quotes should do the trick but again make sure you use double quotes only for the If statements and the single quotes for the attributes of the shortcodes.
Thanks.
The topic ‘[Closed] [wpv-conditional] in Events Manager Form’ is closed to new replies.