I have a WordPress Installation. I have about 3 x custom post types on my site. When I do a search, all post type results get displayed on the front end on 1 page. Some post types are totally different from others content wise so the results look a bit funny.
Is there a way to split the results into tabs according to post type? I want to leave the results as default the way they are now (All Results) but then have tabs to the right filtering out the different results according to post type they belong to.
I created a jpeg here to help explain exactly what I am trying to do.
Thanks
http://f.cl.ly/items/110S2K1A0T3m290Y0C14/Filter_post_Types.jpg

Update 1:
Just wanted to add a bit more info on the code side
I was planning on using shortcodes as tabs
[tabs]
[tab]All Search Results[/tab]
[tab]Post Type 1 Results[/tab]
[tab]Post Type 1 Results[/tab]
[tab]Post Type 1 Results[/tab]
[tab]
or in PHP Template I can also do it by
<?php
echo do_shortcode('[tabs style="boxed" id="searchTabs"]
[tab title="Post Type 1"]Post Type 1 Results[/tab]
[tab title="Post Type 2"]Post Type 2 Results[/tab]
[tab title="Post Type 3"]Post Type 3 Results[/tab]
[/tabs]');
?>
I am thinking there is something here that can help me, but not sure how to implement it http://codex.wordpress.org/Template_Tags/get_posts
Update 2:
Other advice I have received on another forum is to try code like this, but I cannot seem to implement it correctly to my search template php which is here http://pastie.org/4248751
The code suggested was
<?php
$the_slug = 'my_slug';
$args=array(
'name' => $the_slug,
'post_type' => 'custom_post_Type_1',
'post_status' => 'publish',
'numberposts' => 1
);
$my_posts = get_posts($args);
$the_slug2 = 'my_slug2';
$args2=array(
'name' => $the_slug2,
'post_type' => 'custom_post_Type_2',
'post_status' => 'publish',
'numberposts' => 1
);
$my_posts2 = get_posts($args2);
echo do_shortcode('[tabs style="boxed" id="searchTabs"]
[tab title="Post Type 1"]
<?php //This code is for first post type
foreach( $myposts as $post ) : setup_postdata($post); ?>
<li><a>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
[/tab]
[tab title="Post Type 2"]
<?php //This code is for second post type
foreach( $myposts2 as $post ) : setup_postdata($post); ?>
<li><a>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
[/tab]
[/tabs]');
?>
EDIT: Sorry – understand now.
User different loops in each tab.
First tab:
Each other tab would have the same loop, but with an added parameter in the query