WordPress.org

Support

Support » Plugins and Hacks » Co-Authors Plus » [Resolved] get id inside CoAuthorsIterator

[Resolved] get id inside CoAuthorsIterator

  • ...
    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/

Viewing 1 replies (of 1 total)
  • Plugin Author Daniel Bachhuber

    @danielbachhuber

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

    $coauthors = get_coauthors();
    foreach( $coauthors as $coauthor )
    echo $coauthor->display_name;
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] get id inside CoAuthorsIterator’ is closed to new replies.
Skip to toolbar