Problem:
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:
[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' )"] <a class="button" href="website">Diese Veranstaltung ändern</a> <br /> [/wpv-conditional]
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Dieses Thema enthält 6 Antworten, hat 3 Stimmen.
Zuletzt aktualisiert von vor 1 Monat, 2 Wochen.
Assistiert von: Christopher Amirian.