WordPress.org

Forums

Co-Authors Plus
Formatting output of author list (2 posts)

  1. 1rkamin
    Member
    Posted 4 years ago #

    Hi everyone. I am a PHP novice (generous designation) trying to figure out how to harness the power of Co-Authors Plus

    Would somebody be able to assist me in getting the plugin to output authors to look like this ---

    Author 1 name
    Author 1 email
    Author 1 AIM

    Author 2 name
    Author 2 email
    Author 2 AIM

    I am scratching my head tying to understand what some of the release/usage notes mean. I don't quite have the expertise to figure out how to get beyond displaying "Author 1 and Author 2"

    Thanks!

  2. 1rkamin
    Member
    Posted 4 years ago #

    I gave it the old college try and successfully experimented with the iterator

    My implementation may not be the most elegant, but it works:

    <?php $i = new CoAuthorsIterator();
    
    $i->iterate();
    
    echo "<strong>";
    the_author();
    echo "</strong>";
    echo "<br>";
    the_author_email();
    echo "<br>";
    the_author_meta('aim');
    echo "<br>";
    echo "<br>";
    while($i->iterate()){
        print $i->is_last() ? ' ' : ', ';
       	echo "<strong>";
            the_author();
            echo "</strong>";
    	echo "<br>";
    	the_author_email();
    	echo "<br>";
    	the_author_meta('aim');
    }
     ?>

    I'm still wrestling with the syntax/formatting the author email addresses into hyperlinks. There probably is an easy way to do this...

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