I have a custom post type named 'Artists'. My current search results are pulling this post type along with my standard posts in one grouping. I am having trouble separating the two posts types in my results.
Instead of...
- Blog Post
- Blog Post
- Artist Post
- Blog Post
- Artist Post
I'd like....
BLOG POSTS:
- Blog Post
- Blog Post
- Blog Post
ARTIST POSTS:
- Artist Post
- Artist Post
Is that possible? I am not sure if I can solve this with one loop/query or it would be faster to use two queries?
Current code is here...
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php the_date(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
</article><!-- #post-## -->
Any help appreciated. I realize there are some similar questions on this already, but most have been unhelpful for this particular situation.