Support » Plugin: Co-Authors Plus » List Posts By A Co-Author Not Working
3 years, 3 months ago
I am attempting to use the methods found here on the official site: http://vip.wordpress.com/documentation/list-posts-by-a-co-author/
However, it does not result in a loop. And, yes, I have inserted my template structure where it says “// Do your presentation”.
Both $coauthor and subsequently $coauthor_term fail to return any results as well.
Am I missing something obvious here, or is there a bug?
So, I hacked the method to obtain the user slug by capturing the URI.
$slug = $_SERVER['REQUEST_URI'];
$slug = str_replace('author', '', $slug);
$slug = str_replace('/', '', $slug);
I plugged this into the $args variable for the wp query.
$args = array(
'post_type' => 'posts',
'posts_per_page' => 10,
'post_status' => 'publish',
'tax_query' => array(
'taxonomy' => 'author',
'field' => 'slug',
'terms' => $slug,