If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
October 19, 2011 at 1:28 pm #6480
I am working off a child theme of Newscast. I have a custom post type registered and have the native wordpress taxonomies associated with this custom post type.
I have also selected a specific category to display on the slider. When I select this category within the custom post type it DOES NOT appear on the accordion slider.
Does the slider not call custom post types even if it resides in the same category?
Any help would be appreciated.
ThanksOctober 19, 2011 at 2:19 pm #54318
no – the slider supports “standard post” only because the query searches for categories and not taxonomies/terms. You can modify the query in index.php – search for following code:
$additional_loop = new WP_Query("cat=".$k_option['mainpage']['feature_cats_final']."&posts_per_page=".$k_option['mainpage']['feature_count']);October 19, 2011 at 3:40 pm #54319
Yes but can I display both the category selected in the mainpage options as well as displaying custom posts? In other words can I run multiple loops here?October 19, 2011 at 4:41 pm #54320
I think it’s even possible to combine both post types in one query by using arrays, etc. as parameters (some nice code snippets can be found here: http://codex.wordpress.org/Class_Reference/WP_Query ). However the easiest solution may be to duplicate the query loop and to modify the second or the first query to your needs.October 19, 2011 at 4:56 pm #54321
I got both post types to return by doing this:
$additional_loop = new WP_Query( array
( 'post_type' => array('tribe_events','post' )),
But it is not returning the category only and the proper post per page set in the optionsOctober 20, 2011 at 12:04 am #54322
$additional_loop = new WP_Query( array(
'post_type' => array('post','tribe_events'),
'cat' => $k_option['mainpage']['feature_cats_final'],
'posts_per_page' => $k_option['mainpage']['feature_count'],
)); // end slider queryOctober 20, 2011 at 6:39 am #54323
The topic ‘Custom Post Type not showing in Accordion Slider’ is closed to new replies.