WordPress.org

Forums

Co-Authors Plus
[resolved] Can coauthors_wp_list_authors list ONLY guest authors and not WP users? (8 posts)

  1. notkristina
    Member
    Posted 2 years ago #

    I want to list my guest authors, but coauthors_wp_list_authors() lists guest authors and site users. The result is that guest authors that are mapped to a WP user are included twice, rendering the list useless. How can I limit the list to guest authors only?

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

  2. jageo
    Member
    Posted 2 years ago #

    looking for this info too. Thanks

  3. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    There isn't a way currently, but I'll try to work that into the next release.

    https://github.com/Automattic/Co-Authors-Plus/issues/118
    https://github.com/Automattic/Co-Authors-Plus/issues/119

  4. notkristina
    Member
    Posted 2 years ago #

    Thank you, Daniel. It looks like Co-Authors Plus creates a custom post type called guest-author, but WP doesn't generate an archive page of this post type. It may be a dumb question, but in the interest of possibly coming up with a workaround in the meantime, may I ask what special attribute of the guest-author post type prevents it from behaving like any other custom post type?

  5. notkristina
    Member
    Posted 2 years ago #

    For the time being, I think I've more or less circumvented the issue, but I haven't tested yet to see what additional problems my solution may have created. I've added this just after foreach ( (array) $authors as $author ):

    if($users_already_called[$author->user_login] || $author_as_user = get_userdata( $author->ID)) continue;
    $users_already_called[$author->user_login] = $author->user_login;

    That way, no user is mentioned twice. The second condition in my if statement excludes WP users who aren't mapped to a Guest Author, because in my case, I don't want any non-Guest Author users in this list.

  6. akoetsier
    Member
    Posted 2 years ago #

    Hi , i want my site users to submit posts and i want them to add the person where the post is about.
    The other "persons" are a custom user type named "civilians".

    Can i popup this box on the frontend and let them find and add a "person" so that the info about this "person" can be showed with user meta ?

  7. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Hi akoetsier,

    In the future, please create new forum threads for new questions.

    Can i popup this box on the frontend and let them find and add a "person" so that the info about this "person" can be showed with user meta ?

    This is outside the scope of support offered in the Co-Authors Plus forums. I'd recommend you connect with your local WordPress meetup and see if you can find a developer to work with.

  8. Nick Ciske
    Member
    Posted 1 year ago #

    I just had to do this for a client site -- this is what I ended up using as I couldn’t get the template tags to do what I needed:

    https://gist.github.com/nciske/5885607

    Note: I excluded where I output the bio as I'm using a custom field/WYSIWYG editor on that site (via ACF).

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