Viewing 1 replies (of 1 total)
  • Thread Starter jonwatson87

    (@jonwatson87)

    Got it! ??

    I edited my variable ($theauthors) to include the prefix (cap-) so that my variable echoed something like this:

    cap-joe.bloggs,cap-jane.doe,cap-steamy-bacon

    and then used the following tax_query:

    'tax_query' => array(
    	array(
    		'taxonomy' => 'author',
    		'field' => 'slug',
    		'terms' => explode(',', $theauthors)
    	)
    )
Viewing 1 replies (of 1 total)
  • The topic ‘Querying Multiple Authors in WP_Query’ is closed to new replies.