Query Taxonomy for Custom Post Type
-
I have a custom post type called heartspace-podcasts, that has custom fields and a custom taxonomy called “podcast-season” – Season 1, Season 2, etc.
I am looking for help to modify the loop on my custom archive page to group the podcasts by season. How would I modify this loop?
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="col-md-3"> <a href="<?php the_permalink() ?>"><div class="podcast-thumb"><img src="<?php the_field('episode_image'); ?>" class="aligncenter" style="margin-bottom:10px;"></div></a> <h3 style="color:#f28fad; font-size:20px; margin-top:10px; "><a href="<?php the_permalink() ?>" > <?php the_field('podcast_episode_title'); ?></a></h3> <?php echo strip_tags( get_the_excerpt() ); ?> <div class="clearfix"></div> </div> <?php endwhile; ?> <?php else : ?> <h1>404 | Nothing Found</h1> <p>We're sorry, but the page you're looking for cannot be found. Please return to our <a href="<?php echo get_option('home'); ?>">homepage</a> or try again.</p> <?php endif; ?> <div class="pagination"> <?php global $wp_query; $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages ) ); ?>
Thanks for any help you can offer.
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query Taxonomy for Custom Post Type’ is closed to new replies.