Forum
Categories - show selective ones
Hello,
I'm creating a blog category section to list a few specific categories. So I'm trying to display a list of categories but be filter which are displayed. I also then want to use a template where it displays the last post image from within that category.
Firstly is that possible? Should I be using perch_blog_categories over perch_blog_custom, and how do you filter the categories to only display certain ones?
What factor are you trying to filter on?
The category title
Ok, so you'd do something like
Thanks Drew, I have the below but I'm just getting a blank page (php error).
Anything obviously wrong?
What's the error from the error log?
Hi Rachel,
I've just updated to the latest version of Perch and Blog and it's now working (sorry I should have done that straight away).
However it's only returning the first value in the list.
Are your category titles all lowercase like that? Have you tried matching against the slug instead?
I've just tried CatTitle with values as camel case and filtering by CatSlug.
The first in the list always works fine, I can reorder them and it always displays the first one correctly regardless what it's filtered by (slug or title)
Ok, that sounds odd. I'll have to take a look into it.