WordPress.org

Ready to get started?Download WordPress

Forums

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

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

    http://wordpress.org/plugins/co-authors-plus/

  2. timbunch
    Member
    Posted 7 months 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(
            array(
                'taxonomy' => 'author',
                'field' => 'slug',
    	    'terms' => $slug,
            ),
        ),
    );

Reply

You must log in to post.

About this Plugin

About this Topic