• Hi, I’m trying to use WP_Query to get a list of co-authors and pass any arguments allowed. Any help? Thanks!

    $args = array(
    	'post_type' => 'post',
    	'tax_query' => array(
    		'relation' => 'AND',
    		array(
    			'taxonomy' => 'my_post_taxonomy',
    			'field' => 'slug',
    			'terms' => array( 'my-post-taxonomy' )
    		),
    		array(
    			'taxonomy' => 'author',
    			'field' => 'id',
    			'terms' => array( 103, 115, 206 ),
    			'operator' => ''
    		)
    	)
    );
    $query = new WP_Query( $args );

    P.S. I know there is a function “coauthors_wp_list_authors” but I need to use WP_Query.

    https://www.ads-software.com/plugins/co-authors-plus/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use WP_Query to get co-authors and args?’ is closed to new replies.