WordPress.org

Forums

Display posts by one author and only from current category (2 posts)

  1. copymaker
    Member
    Posted 1 year ago #

    Hello

    I need your help to solve my problem.

    So, what I can't make:
    For instance, I have a category 'NEWS', this category has some subcategories 'POLITICS', 'SPORT', 'LIFE' etc.

    In the sidebar displayed a list of author's names and if I click for some author in some category I need to show only posts written by this author and from the current category, subcategory.

    How can I create it? I suppose that it's able to create by pre_get_posts but not sure.

  2. copymaker
    Member
    Posted 1 year ago #

    stackoverflow.com/a/18512467/1071555 This is almost what I need, but I need to get current category dynamically for certain user. I try to get category ID from function.php but I receive an empty result. What's wrong?

Topic Closed

This topic has been closed to new replies.

About this Topic