• I’ve got wordpress up and running; and I’ve added several categories, subcategories, and posts. However, I don’t like the way wordpress displays categories by default.

    What I want to achieve is to only display top level categories in the categories widget list. Then, when a user clicks the category to go to the category page, they’re presented with a list of sub categories. Selecting a subcategory gives them the posts.

    Is there any way of achieving this? The current method, to me at least, seems pretty illogical and makes subcategories pointless.

    And, while we’re on the subject of categories, is there a way to a. Have the widget display all top level categories, even when they have no posts? and b. Display a message that says, “Looks like there aren’t any posts here; why not select another category instead?” rather than “it seems we can’t find what you’re lookign for” should they click on a category that contains no posts?

    Thanks for any and all help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ashley

    (@ashleycox)

    OK, Progress. Using a widget called ‘NS Category Widget’, I’ve managed to get only the top level categories to display on my pages, irespective of whether they contain any posts.
    So all that’s left is to figure out how to:
    When a user clicks a category, present the user with a list of categories on the resulting page

    Any ideas?

    Yea you’re going to have to go with a plugin to achieve this along.

    Other than that you’d have to write a custom query to pull top level categories, and mix in some javascript/jquery to the drop down piece of it functioning properly.

    If your not too familiar with code it can be a bit challenging to achieve.

    Thread Starter ashley

    (@ashleycox)

    Thanks for your reply. I’m not looking to do a dropdown menu; what I’m looking for is that each category page shows a list of categories, unless it is the lowest level category; in which case, it shows the posts.
    If necessary; I’ll have to modify my theme and do this in PHP. Just was kindaa hoping there would be an easier way, given that WP is supposed to be point n’ click… or am I perhaps just getting lazy?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show category>subcategory>posts’ is closed to new replies.