Co-Authors Plus
[resolved] Dynamically assign co-authors (2 posts)

  1. Saurabh Shukla
    Posted 4 years ago #


    I'm trying to establish a parent child relationship between users. I have been able to store these relationships using user meta. What I want to be able to do is, automatically assign the parent or the child user as a co-author, whenever one of them creates a new post/post type. What would be the right way to call the function add_coauthors?

    Thanks in advance.


  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 4 years ago #

    You might do something like this (untested): https://gist.github.com/2847390

    You'll need to ensure you're storing the user_login value in usermeta, and update the get_user_meta() call to use your proper key.

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