Include events in custom loop
-
I want to be able to show some events in a loop on a page.
Is this possible?
This is my current query:
$numPosts = (isset($_GET['numPosts'])) ? $_GET['numPosts'] : 0; $page = (isset($_GET['pageNumber'])) ? $_GET['pageNumber'] : 0; $cat = (isset($_GET['cat'])) ? $_GET['cat'] : "news"; query_posts( array( 'posts_per_page' => $numPosts, 'paged' => $page, 'category_name' => $cat )); if (have_posts()) { while (have_posts()){ the_post(); get_template_part( 'contentgrid', get_post_format() ); } }
I want to loop through events within a certain category in this loop too.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Include events in custom loop’ is closed to new replies.