Filter buttons for subcategories (as in Portfolio)

Viewing 8 posts - 1 through 8 (of 8 total)
  • #14399
    PLSantaCroce
    Participant

    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

    #14412
    Daniel Tara
    Keymaster

    You 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.

    #14423
    Myleene
    Participant

    Seeing this post, i tried to add manually “category-filter” class to a div and insert simple links. this works fine.

    #14501
    PLSantaCroce
    Participant

    Thanks 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”.


    @Myleene
    :

    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

    #14582
    PLSantaCroce
    Participant

    @Daniel
    I’m stuck 🙂

    #14608
    Myleene
    Participant

    go 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 category

    #14617
    PLSantaCroce
    Participant

    @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.

    #14781
    PLSantaCroce
    Participant

    @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! 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.