I have a site that has a few custom post types. When a customer searches it shows a combination of all the different posts. I'd like to segment the two on the same page resulting in something that looks like the example below. Any help would be appreciated.
Showing results for: really cool search
Video Management
from a central location. Radius offers interactive map capability, and multiple monitor support. Designed for a multiple monitor environmen... http://openeye.net/products/software/video-management
Knowledge Base Entries:
Repairing your device
from a central location. Radius offers interactive map capability, and multiple monitor support. Designed for a multiple monitor environmen... http://openeye.net/?faq=video-management-repair
Example of my loop from loop-search.php
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h4 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_post_thumbnail; ?>
<?php if (function_exists('relevanssi_the_excerpt')) { relevanssi_the_excerpt(); }; ?>
<a href="<?php the_permalink(); ?>"><?php the_permalink(); ?></a>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_post_thumbnail; ?>
<?php the_content( __( 'Continue reading', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<a href="<?php the_permalink(); ?>"><?php the_permalink(); ?></a>
</div><!-- .entry-content -->
<?php endif; ?>
my changes to search.php
<?php if ( have_posts() ) : $posts_per_page = 20; ?>
<span style="font-size:18px;" class="page-title"><?php printf( __( 'Showing results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></span>
<?php
/* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called loop-search.php and that will be used instead.
*/
get_template_part( 'loop', 'search' );
?>
<?php else : ?>
<div id="post-0" class="post no-results not-found">
<h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>
<div class="entry-content">
<?php if (function_exists('relevanssi_didyoumean')) {
relevanssi_didyoumean(get_search_query(), "<p>Sorry, but nothing matched your search criteria. Please try again with some different keywords. Or you can also try ", "</p>", 5);
}?>
<?php related_searches(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>