Query all posts of author even if he/she is co-author
-
Hi,
Im coding a wordpress template and i have this plugin installed.
I’m trying to query all posts of single author, by all i mean all posts where he/she is only author and he/she is couathor of some post.
Im using this simple query to achieve this. How to modify it to get all posts including coauthored posts?<ul data-author="<?php echo $personID?>" class="resources__list"> ?php $args = array( 'post_status' => 'publish', 'posts_per_page' => 3, 'post_type' => array('video'), 'author__in' => $person -> ID ); $knowledge_questions = new WP_Query( $args ); if ( $knowledge_questions->have_posts() ) : ?> <?php while ( $knowledge_questions->have_posts() ) : $knowledge_questions->the_post(); ?> <?php get_template_part( 'template-parts/content', 'article' );?> <?php endwhile; wp_reset_postdata();?> <?php endif; ?> </ul>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Query all posts of author even if he/she is co-author’ is closed to new replies.