php - How can I Split Search Results into Post Types Tabs on Frontend? -
I have a WordPress installation; I have around 3 x custom post types on my site when I do a search All post types are displayed on Front Page at 1 page. Some post types are completely different from others' content, so the results look a little funny.
Is there a way to break the tab in the result according to the post type? I want to leave the result as default (all results) by default, but after that type of post type there are tabs to filter out individual results.
I have made a JPEG here, help me to clarify what I am actually trying to do.
Thanks
I am thinking that there is something here that can help me, but not how to implement it
Update 2 : The other advice I have received on another forum, is to try the code like this, but I guess it can not correctly implement your search template on php suggested Gone code
1); $ My_posts2 = get_posts ($ args2); Echo do_shortcode ('[tabs style = "boxed" id = "searchTabs"] [tab title = "post type 1"] & lt ?? Php // This code is for the first post type foreach ($ myposts $ post):
Comments
Post a Comment