Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1089093
    rekluse
    Participant

    Hello,

    As the title says, I am trying to figure out how to include Portfolio items on the Author pages. Basically we are using Portfolio content for our web courses, and I want to make sure that an author’s course is included on the bottom of the author page.

    So two questions:

    a) How can I get our author pages to include portfolio items, in addition to blog posts by that author?

    b) Is it easily possible to separate those offerings? (i.e. the portfolio items could be displayed under a “Web Courses” header, and the blog items can be displayed under a “Previous Media” header.

    Here are some links so you can see what I mean.

    These two portfolio items are both associated with a particular author:

    http://everyoneisright.com/course-item/okay-im-dead-now-what-practices-for-living-dying-and-living-again/
    http://everyoneisright.com/course-item/strength-for-life-how-to-maximize-your-health-and-wellbeing/

    And I would like them to be included on this page:

    http://everyoneisright.com/author/andrew-holecek/

    …ideally under its own “Web Courses” header, if possible.

    This author currently does not have any blog content, but if he did I’d love those posts to be displayed under a separate header, “Previous Media”.

    Is any of this something you could help me with?

    Thank you!

    #1089583
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in!

    What you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    a] To get author pages to include portfolio items, in addition to blog posts by that author, After the child theme is set up, please add the following code in your child theme’s functions.php file

    // Custom Author filter
    // =============================================================================
    function author_archives_filter($query) {
        if ($query->is_author) {
      $query->set('post_type', array('post', 'x-portfolio'));
        };
        return $query;
    };
    add_filter('pre_get_posts', 'author_archives_filter');
    // =============================================================================

    b] Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

  • <script> jQuery(function($){ $("#no-reply-1089093 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>