WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] Co-Authors Plus + The Vistas theme (7 posts)

  1. primeweb
    Member
    Posted 2 years ago #

    Hello there.
    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.
    Lucio

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

  2. primeweb
    Member
    Posted 2 years ago #

    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;
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($author_name);
    else :
    $curauth = get_userdata(intval($author));
    endif;
    ?>

    <?php
    $blogurl = get_bloginfo('template_url');
    $authid = get_the_author_meta('ID');

    ?>

    <?php
    $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);
    ?>

  3. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Every co-author is actually a taxonomy term, so you should be able to do a taxonomy query to get all of their posts.

  4. primeweb
    Member
    Posted 2 years ago #

    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.

  5. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    The documentation I linked to has a good example that should point you in the right direction.

  6. primeweb
    Member
    Posted 2 years ago #

    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.

  7. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    You will need some modifications. We're happy to provide support in this forum for bugs, high-level questions, etc. You may want to find a developer for changes to your theme like what you need.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic