I am using a theme called The Vistas, designed for Real Estate.
The theme doesn’t have support for more than an agent for each listing. So I searched about plugins and found co-authors-plus. Thanks the authors for the development.
After installed, I am able to add co-authors to the posts. At least it says in the backend that there is more than an author for the post…
However, when I am listing all the author posts (frontend), it only shows when he/she is an author, not co-author. I only want to include in the results for a search when the person is author and co-author… nothing else.
How can I possible do that?
Thanks for your attention.
Having this sample code below, how could I add the co-author information to the args array, in order to also show the posts where an user is also a co-author?
Any help would be appreciated. Thanks.
<?php global $author;
$curauth = get_userdatabylogin($author_name);
$curauth = get_userdata(intval($author));
$blogurl = get_bloginfo(‘template_url’);
$authid = get_the_author_meta(‘ID’);
$args = array( ‘paged’ => $paged,’post_type’ => ‘gtre’, ‘posts_per_page’ => $posts_per_page, ‘author’ => $curauth->ID);
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post);
Every co-author is actually a taxonomy term, so you should be able to do a taxonomy query to get all of their posts.
Hi Daniel, thanks for your replay.
I am sorry, could you be a little bit more specific? Like, using an example.. Not a wordpress programmer, sorry about it.
The documentation I linked to has a good example that should point you in the right direction.
Yes, thanks for your attention, but that link did not completely helped me, since I am not a skilled programmer. It might be easy for you to see, with your experience, but for me it didn’t tell me a lot… is it possible to include the co-author tag in that args array I have? Does it requires lots of changes?
Really sorry for bothering with this.
- The topic ‘Co-Authors Plus The Vistas theme’ is closed to new replies.