Co-Authors Plus
List Posts By A Co-Author Not Working (2 posts)

  1. timbunch
    Posted 2 years 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?


  2. timbunch
    Posted 2 years ago #

    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,

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Co-Authors Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic