I run the following function in my themes functions.php file:
register_taxonomy('series', array('post','page','sermons','podcasts'), array( 'labels' =>array( 'name' => _x('series', 'taxonomy general name'), 'singular_name' => _x( 'series', 'taxonomy singular name'), 'search_items' => __( 'Search Series' ), 'popular_items' => __( 'Popular Series' ), 'all_items' => __( 'All Series' ), 'parent_item' => __( 'Parent Series' ), 'parent_item_colon' => __( 'Parent Series:' ), 'edit_item' => __( 'Edit Series' ), 'update_item' => __( 'View Series' ), 'add_new_item' => __( 'Add New Series' ), 'new_item_name' => __( 'New Series Name' ), ), 'hierarchical' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'series' ), ) );
As you can see in above, the tax 'sermons' is attached to (posts, pages, sermons, podcasts)
That works perfectly and as expected.
Where I am stuck and need help:
I have an 'archive' listing page for the tax 'series'. On that page, all post_types are returned for the tax 'series' in the order they were posted.
The reason you always see what seems like duplicate posts, is because every time I create a new sermon, I also create a new matching podcast. Both the sermon and podcast contain the same tax 'series'.
What I want to accomplish:
I want to separate out the displayed information via post_type. This means the archive page for tax 'series' would look like this:
What I need to do this:
I need some type of example wp_query that would return each post_type with pagination, so that I can create 4 loops, 1 for each post_type that belongs to tax 'series'.
I have searched high n' low, but to date I have not seen even a hint of an example of how to do this anywhere.
I do realize this is getting beyond the normal wp operations, and relatively advanced, but I can handle it. Just need some starting pointers.
It's possible that I may end up figuring out the multi-loops issue, but adding in pagination on a per post_type within the archive page, is going to be really really interesting.
by any chance is anyone willing to help me tackle this issue?