WP Query Category or Custom post
-
Hello,
I am trying to figure out how to return posts from WP query that are in one of 3 categories OR a particular post type. Here is the code I am starting with:
<?php global $post; $querycs_args = array( 'posts_per_page' => 3, 'category_name' => 'case-studies,videos,white-papers', 'post_type' => 'event' ); $querycs = new WP_Query( $querycs_args ); ?> <?php if( $querycs->have_posts() ) : while( $querycs->have_posts() ) : $querycs->the_post(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WP Query Category or Custom post’ is closed to new replies.