0

I'm stuck with an Issue, I'm trying to make a filter that filters away custom post type names using checkboxes and custom taxonomies.

I'll explain the structure since I can't link the localhosted page. Firstly I have a list of post names on a page that come from an custom post type, the post names are links to a details page but nonetheless they have categories checked that come from a custom taxonomy. Now I have the categories listed in a filter in which i'm supposed to click the checkboxes(next to the categories) and being able to filter the names out according to the categories that are checked/unchecked on the post name.

So far I since I suck at jquery have achieved being able to click a checkbox and making all post names disappear that have a category selected at all so it doesn't filter according to the actual category.

This is what I have:

$('#mobilenav').click( function() {
    $('#list').hide();
    $('input:checked').each( function(i) {
        $('#list' + $(this).val()).show();
    });
});

Screenshot if I didn't explain correctly enough (2 screens in 1):

https://i.stack.imgur.com/MIFJN.png

0 Answers0