-
jasonchong
I want a container block which displays categories and subcategories. I was thinking I could do something like this with the new menu feature but I seem to only be Able to create subs with drop down not as a hierarchical list (ideally with accordion style option)
I would also like a block which displays categories with articles from the category listed
I had also thought I might be able to do this with query loops but I couldnt figure that approach out either as it seems I can’t do a query loop on taxonomy (was thinking of nested query loop)
Can smarter heads point me the best way please -
Hi there,
To display categories, have you tried the WP category list block? That would be the easist solution.
To display posts from categories, you can use a query block, add the taxonomy parameter, select category, then select a term.
-
jasonchong
to display simple categories the wp category I possible but won’t allow deeper functionality of offering nested sample articles under the category (ie its just category or sub category). I’m guessing I would have to look at custom code to be able to for example offer it in an accordion style (top level parent category open up to reveal child categories, open up to reveal three sample article titles
my understanding is that selecting a category term means it is not dynamic. to explain further lets say I have 5 categories. Then the loop should return each category (which would be output into a block with the category title) and then a list of related articles underneath (eg 5 articles with a show more option). If I then created two more categories it would then recognise this and create two more blocks for each new category. This would then be more dynamic and allow me to play with it across different pages. I hope that makes more sense as to my intention -
Yes, in this case, you will need to write custom code for that, unfortunately!.
- You must be logged in to reply to this topic.