add Custom Post Type to Hueman dynamic tabs widget
-
I have added a category interviews to mysite.
Both regular posts and cpt ‘video’ can be tagged with the category interview.
I managed to add cpt video to be included to the home page and archive pages using this code (found on the internet)
/* add cpt to home and archive pages */ function add_post_types_to_query( $query ) { if ( (!is_admin()) && $query->is_main_query() ) if ( $query->is_category() || $query-> is_tag() || $query-> is_home() ) { $query->set( 'post_type', array( 'post', 'video' ) ); //video is a custom post type } return $query; } add_action( 'pre_get_posts', 'add_post_types_to_query' );
but I struggle adding cpt ‘video’ to Hueman dynamic tabs widget in my sidebar so it displays both regular posts and cpt ‘video’ tagged with category interviews.
I wonder if there’s a function I could use achieving this or if I have to use some plugin as work around.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add Custom Post Type to Hueman dynamic tabs widget’ is closed to new replies.