The [wpv-conditional] shortcode doesn’t work as expected in an Events Manager template. Specifically, the condition comparing [wpv-user field="ID"] with [wpv-post-author format="meta" meta="ID"] doesn't produce output, even though their values are correct.
Solution:
The issue is caused by mixing types of quotes within the conditional statement, which can prematurely close the condition. Ensure you use:
- Double quotes for the if statement.
- Single quotes for the attributes within the shortcodes.
Updated working example:
[php][wpv-conditional if="( '[wpv-user field='ID']' eq '[wpv-post-author format='meta' meta='ID']' ) OR ( '[wpv-current-user info='role']' eq 'administrator' ) OR ( '[wpv-current-user info='role']' eq 'editor' )"]
Diese Veranstaltung ändern
[/wpv-conditional]
[/php]