I have a website and I'd like to be able to list all of the pages by a particular co-author.
So far I have this code which will list all of the pages by an author showing the title of the post and having the title linked to the actual post. The problem is that it only will list posts where the co-author is the primary author listed first. All other posts by that author aren't shown.
Could you help me out? I like how this code works, I just need it to list all of the posts by the author, and just not the ones where they are the primary author.
<?php $author_id = get_queried_object()->post_author; $my_pages = wp_list_pages('authors='.$author_id.'&sort_column=post_name&echo=0&title_li='); $var1 = '<a'; $var2 = '<a'; $var3 = '</a>'; $var4 = '</a>'; $my_pages = str_replace($var1, $var2, $my_pages); $my_pages = str_replace($var3, $var4, $my_pages); echo $my_pages; ?>