n results found
—–
n pages
Page title 1
Page title 2
etc.
—–
n posts
Post title 1
Post title 2
etc.
–––––
n [custom post type name]
Post type title 1
etc.
How would I achieve something like this?
(and ideally I’d like to customize the sort order of the post types but let’s first concentrate on the above issue)
]]>$search_query = new WP_Query(array(
's' => get_search_query(),
'orderby' => 'type',
'posts_per_page' => -1
));
]]>