WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] Values - `assign_user_to_coauthor` (3 posts)

  1. tedinoz
    Member
    Posted 1 year ago #

    Hi

    I want to assign user posts to guest authors (and BTW, then I'll delete the users) - I'll use the wp-cli subcommands (once I learn how to use it <grin>!!). "create_guest_authors" is easy because there are no variables AND it does the entire list of users in one pass. "assign_user_to_coauthor" doesn't seem so straightforward.

    2 questions:
    1: I'm confused by the data values to use. The code says "$args, $assoc_args". As far as I can see $args is never referenced (or at least not at this point of development??), which leaves "$assoc_args". "user_login" seems OK/logical, but what field is used for the value of 'co-author'.

    2: Can one do this in bulk? Since "$assoc_args" is an array, would (unique) multiple pairs of user/co-authors result in assignment of posts for all of those pairs; or is this a one-at-a-time process.

    Ted

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

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    If you run:

    wp co-authors-plus create-guest-authors

    on the command line in the root directory of your WordPress install, it will automagically create guest authors for each of your users.

    You should be able to then just delete the users without having to run additional commands.

    It's always worthwhile to make a backup before doing bulk transformations like this :)

  3. Vajaah
    Member
    Posted 8 months ago #

    I've used the commands packaged for wp-cli and LOVE THEM. However, I'm finding that in order for the posts count to be updated in Admin > Guest Authors I need to update the posts individually. This install has 20,000 posts. I haven't deleted the users yet, is that necessary? Any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.