I am trying to create a custom template that can give the following effect…
-
Category Name A (with image)
- post with category name A
- post 2 with category name A
- post 3 with category name A
-
Category Name B (with image)
- post with category name B
- post 2 with category name B
- post 3 with category name B
Should I do this with custom post types? If so, do I have create two, or can I manage this with one custom post type?
I am not sure I understand exactly the problem, but If I do – there is absolutely no need for a custom post type.
all you have to do is use multiple loops and basically divide the query into sub-loops for each category .
Note that you can do the same using Loops with
query_posts()
, Loops withWP_Query()
or Loops withget_posts()
.regarding the image – I am not sure what Image you want – but if you refer to a category image (special image assigned to categories) you will need to use some plugin like these ..