-
PLSantaCroceParticipant
Hi all,
I was wondering if it’s possible to have subcategories filtered out just like Portfolio’s subcategories, with nice buttons outside Portfolio’s page.
I’ve got a big Event category and I want users to be able to filter out events according to many subcategories I’ve created (Sport, Cinema, Music…). I like the way this is achieved in Portfolio and I would like to use the same CSS/function or whatever it is to recreate the same “menu”.Any help appreciated!
Thanks
Daniel TaraKeymasterYou have a function called pinboard_category_filter() in functions.php which is used for the portfolio filter and you can adapt it to your needs.
MyleeneParticipantSeeing this post, i tried to add manually “category-filter” class to a div and insert simple links. this works fine.
PLSantaCroceParticipantThanks a lot for your replies.
I went through the category_filter function but I understand more or less what it does, but I am not able to modify it or adapt it to what I want. I saw that Portfolio’s templastes call that function in the content section.
Should I modify a Blog template to call that function? How would the function know which subcategories it should pick and show (the ones in “Events” parent category and not others, like Portfolio’s parent category)?
I don’t want filters to appear in blog pages (i.e. main blog page) other than “Events”.Seeing this post, i tried to add manually “category-filter” class to a div and insert simple links. this works fine.
A div, where?
I am not working on a page or post, it’s a blog template.The place where I want the filter to appear is here
Thanks again
MyleeneParticipantgo to post->category in you wp dashboard.
add the category you want to have as button at the top of your page -> as subcategory of your categoryPLSantaCroceParticipant@Myleene
That’s the standard way to show buttons IN Portfolio, that is, how to create a subcategory. I know that. What I want is to have those buttons OUTSIDE Portfolio’s page and, as Daniel Tara suggested implicitly, there must be some code editing somewhere, because it’s not a standard procedure. Buttons don’t show up in other areas just because they are subcategories.
If you meant something different, I didn’t get it.PLSantaCroceParticipant@Daniel
I need to show off the blog in a week time and I don’t know how to achieve what you suggested… Help me, please! 🙂
Tagged: buttons, categories, child, filters, parent, portfolio, subcategories
You must be logged in to reply to this topic.