displaying all author posts and coauthor posts
-
I am trying to display all author posts and coauthor posts on my authors.php page. Currently the single authors site is showing all the posts the he/she has written. But I am trying to display all the posts he/she has written as well as coauthored. I am currently using ACF to allow for the client to select the coauthor from a complied list of users who are authors. I am also using Timber. Currently this is what I have:
author.php
$coauthor_query = array( 'post_type' => 'post', 'meta_key' => 'coauthor', 'meta_query' => array( 'key' => $author, 'compare' => '=' ) ); $data['coauthors_posts'] = Timber::get_posts($coauthor_query);author.twig
{% for post in coauthors_posts %} {% include 'tease-coauthor.twig' %} {% endfor %}so I have a query to select posts with a coauthor and have it display if it equals the author.
any help would be appreciated.
thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘displaying all author posts and coauthor posts’ is closed to new replies.