Displaying Events by category – Events Manager
-
Sorry for the noob question but how would i write this in the PHP file with the following short code?
{has_category_X}content{/has_category_X}
to display events that correlate to a certain category?
I’ve tried the code below (where cat1 is the name of the category) but doesnt seem to display anything.
echo do_shortcode('[has_category_cat1}content{/has_category_cat1]')
RE-EDIT: I’ve also tried passing arguments to the WP_query object and this lists all events, and doesnt filter category:
$args = array( 'post_type' => 'event', 'category' => 'cat1' ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post();
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Displaying Events by category – Events Manager’ is closed to new replies.