Search page different title per results
For this to work, you will need to have your search results ordered by the post type. function order_by_pt($where,$qry) { if (is_main_query() && $qry->is_search()) { global $wpdb; $where = $wpdb->posts.’.post_type DESC’; } return $where; } add_action(‘posts_orderby’,’order_by_pt’,1,2); Then a Loop like this one will do what you want, if I understand you. $type_title=””; while (have_posts()) { … Read more