i designed a single page using php-code on it. now i want to display different event-categories depending on different user-roles and therefore i want to use shortcode from event-manager. but unfortunately it doesn’t work. could anybody help?
this is what i’ve got so far:
<?php if ( user_role_check( 'd1' )): echo do_shortcode('[events_list category="8"]') ; elseif ( user_role_check( 'd2' )): echo do_shortcode('[events_list category="9"]'); elseif... //and so on endif; ?>
p.s.: the user-roles are added by myself, so they aren’t standard – but this doesn’t seem to be the problem
- The topic ‘Using EM shortcodes in php context’ is closed to new replies.