Support » Plugin: Co-Authors Plus » [Plugin: Co-Authors Plus] Cannot View Secondary Author Information

  • I have a page here that basically lists the users (authors), and am attempting to retrieve the pages (not posts) they are responsible for via an inner loop

    http://174.121.152.7/~rmfpc/attorneys/

    It is only however showing the pages for the first primary author and ignoring the secondaries.

    Code below

    <?php
      $authors = get_coauthor_list_main();
      if($authors)
        foreach($authors as $author_id):
        ?>
    
                      <table width="100%" border="0" class="attorneyTable">
                        <tr>
                          <td width="250" valign="top"><p class="attorneypara" style="font-size:12px;" > <strong> <?php echo  the_author_meta('display_name', $author_id);  ?><br />
                              </strong> <?php echo the_author_meta('user-title', $author_id); ?> </p>
                            <p class="attorneypara" style="font-size:12px;" >&nbsp;</p>
                            <p class="attorneypara"><a href="http://174.121.152.7/~rmfpc/author/<?php echo  $displaynicename; ?>/">View Attorney Profile >></a> </p></td>
                          <td valign="top"><?php
    $args = array(
    'tax_query' => array(
    			array(
    				'taxonomy' => 'author',
    				'field' => 'slug',
    				'terms' => the_author_meta('user_login', $author_id)
    			)),
    'post_type'=>'page',
    'authors'      => $author_id,
    'post_status'  => 'publish',
    'child_of'     => 40,
    'title_li'     => ''
    
    );
    
    $pages = get_pages($args);
    foreach ( $pages as $page ) {
    echo $page->post_title;
    }
    
    ?></td>
                        </tr>
                      </table>
                      <?php
        endforeach;
    ?>

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

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

    (@danielbachhuber)

    Can you try using the get_coauthors() function to get the co-authors of the post? You’ll need to make sure it’s within the loop, or that you’re passing the post ID

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Co-Authors Plus] Cannot View Secondary Author Information’ is closed to new replies.