Sidebar clickable category list using query

  • See link in private field

    So I am using “posts” and “post categories” to create content for pages – so each high level “post category” is a “page” – as you can see directory, documents and notices

    I can display on each page the posts from that category using the QUERY function quite happily

    But they would like a mini menu in the sidebar (or above I guess) that allows them to click into the sub-categories, and drill down

    I was oddly enough not able to create a clickable mini catgeory link list using query – is it possible and am I just missing something?

    I have it working by using the standard “categories list” block BUT its showing all categories and ideally I would only want to display the subcategories for that main category

    So on directory page I would like sidebar to show

    Directory (4)
    Education (1)
    Health (1)

    On document page I want to see

    Documents (23)
    Agendas (8)
    Finance (4)

    and on notices

    Notices (22)
    Community (15)
    Council (4)

    etc

    I am not worried about number of posts if that matters, but it does need to click

    I know that could create an actual menu – but these subcategories can change and I would rather it was automatic for the customer

    Thank you
    Sarah

  • Hi Sarah,

    I was oddly enough not able to create a clickable mini catgeory link list using query – is it possible and am I just missing something?

    No, query block can not query categories, unfortunately! It’s for post types/post meta, but not taxonomies.

    You will need custom development for what you want.

  • Thank you Ying – at least for once its not me being dim then!!

    Will it ever be able too – ie in the future?

    Thank you
    Sarah

  • I don’t know, maybe 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.