Trouble with two WP queries (beginner) to pull two post types
I’m running a page that currently pulls one post type of ‘news’ with a category of ‘dogs’.
However, I want to add another query that pulls everything from the ‘cat’ post type with no category parameter – just pulls every single cat post.
How can I adjust my code to add a second query to pull cat posts as well?
$related_args = array( 'post_type' => 'news', 'posts_per_page' => -1, 'tax_query' => array( array( 'taxonomy' => 'news-category', 'field' => 'slug', 'terms' => 'dogs', 'operator' => 'IN' ) ) ); $related = new WP_Query( $related_args ); if( $related->have_posts() ) :
while ( $related->have_posts() ) : $related->the_post();
$cat = get_the_terms( $post->ID, ‘news-category’ );