• Hello,

    Its possible each category to show its subcategory instead posts . for example :

    category 1 has 1 2 3 subcategories and 1 has 20 post 2 30 post 3 15 post
    category 2 has a b c subcategories

    so when i open category 1 to show me only subcategories 1 2 3 and if i open 1 will show the posts

    best regards

Viewing 1 replies (of 1 total)
  • All of the queries for WP pages are from the posts table, not taxonomies or terms.
    So the URL for the parent category makes the query for all posts in that category.
    You would need to write something different in the template file to ignore the main query and do your own query. Or, a plugin that changes the rewrite rules and adjusts the query for that type of URL.

    Alternatively, you could change your category template file to output a list of subcategories before the posts are output. I’ve seen a theme do this, and as a user, I did not like it.

Viewing 1 replies (of 1 total)
  • The topic ‘category and subcategory’ is closed to new replies.