WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] get id inside CoAuthorsIterator (2 posts)

  1. asafche
    Member
    Posted 1 year ago #

    ...
    i = new CoAuthorsIterator();
    $i->iterate();
    	the_author_posts_link();
    	if (get_user_roles(get_the_author_meta(ID)) == 'temp-author') {
    ...

    the get_the_author_meta(ID) in wp debug mode says -
    otice: Use of undefined constant ID - assumed 'ID' in /var/www/bayadaim/wp-content/themes/bayadaim/functions.php on line 239

    i'm trying to figure out how to get the ID of the author.
    thanks.

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

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    I'd recommend using get_coauthors() instead and doing a loop with that:

    $coauthors = get_coauthors();
    foreach( $coauthors as $coauthor )
    echo $coauthor->display_name;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic