Figured it out. Missed the concatenated class dot for the data-filter attribute…
Changed this line:
echo '<button id="category-filter" data-filter="'.$term->slug.'">'.$term->name.'</button>';
To this:
echo '<button id="category-filter" data-filter="' . '.' .$term->slug.'">'.$term->name.'</button>';
Related Posts:
- Make parent category not selectable when it has child categories
- WordPress and isotope filtering
- Adding Colorpicker Field To Category
- Filter categories using tags
- Make parent categories not selectable
- Add custom category name as data-filter to switch between these categories
- Can paginate_links() be customized for a specific category or tag?
- Filtering by Category doesnt paginate correctly on the backend
- Dropdown category filter
- Replace category titles
- Hide posts of a certain category unless logged in
- What’s the Simplest Way to Override/Rewrite the %category% Permalink Structure Tag?
- Filter categories of posts with checkboxes
- How to Filter categories in the permalink structure
- How to display posts under a specific subcategory of a given category
- Taxonomy filter all children
- Filter Home Page Posts in Buddypress [closed]
- Categorising posts/pages into years published
- Inserting Category programmatically
- Automatically set default password to all posts in a specific category
- get_the_categories filter returns an empty array
- Category pie diagram meta box in post editing page
- category filter doesn’t work in WPML
- Query posts from category based on a filter most favorited
- Filter Categories in meta box for CPTs
- Show only first category name in RSS?
- How to organize custom categories for filtering and selecting
- Filter $cpt categories to omit certain category
- How to set a filter by category within a customised page
- Refine/Filter the Search Results by Category
- Admin comments and user restrictions
- WordPress Post # of # filtered by category slug
- Pagination for ajax category filter
- ajax for filtering posts by category in wordpress loops
- How to hide category name
- How to make the ‘delete’ button inactive on some categories?
- Overriding default calendar to show posts from a category
- How can I display tags as categories?
- Display all product tags associated with a specific product category
- Filter WooCommerce archive pages by an additional category
- Portfolio Filter Buttons Wont Work
- “Virtual category page” based on a custom field filter
- Custom tax_query filter not working for Woocommerce product categories
- How to hide some categories in dashboard
- Change post title if post has specific category
- Filter By Category Dropdown List With Custom Taxonomies
- How can I filter posts by tag on the fly
- Change Default Content when Creating a Post based on Previous Category Choice
- Category List and Automatic jQuery classes
- Maintaining a separate posts page for certain categories and don’t show those on home page
- Exclude posts without category from loop
- How to filter post from categories only if the posts appears in one of them, not the other?
- How to fix select filter on category
- wp_dropdown_categories() works correctly but the list is not filtered in admin for custom post type. What is the problem?
- Add $args to wp_list_categories
- How to hide a category or tag everywhere EXCEPT for use with get_posts
- Add filter for specific category only
- How to create category filter on a blog like on the site below?
- How to filter tags by category?
- How to exclude a category returned by get_categories from function.php?
- Can’t display posts by filtering categories using isotope.js
- Correct Hook/Filter to amend category choices on post edit page
- Restrict retrieved terms by category?
- How to check a category checkbox using JavaScript
- Hiding by default posts in given category except for some cases
- Remove “Category:”
- ACF Gallery with Media Categories – how do display categories and sort
- Custom filters inside a specific category?
- filter single_cat_title avoiding the breadcrumbs
- Right way for setting categories
- How to load jquery tag-it plugin into admin?
- Custom built theme won’t filter categories
- category filter doesn’t work
- Chained drop-down menu for custom taxonomy using chained.js
- How to create a photo gallery that can be filtered by the image categories
- Remove “?category=” in the URL wordpress ajax filter work for category
- Replace category titles inside RSS feed
- On Category page, How can I get the category ID?
- Add classname to the_category() function?
- How to order categories in Woocommerce that are spread over multiple pages? [closed]
- Automatically add product_categories to nav_menu
- Add Product categories to WordPress menu without losing hierarchy
- How to change number of items on add new pluggins page from backend?
- Ignoring a category in WP_Query still shows the links in next_post_link()?
- Implementing a tricky wordpress menu (nested categories + thumbnails)
- How can I add more “filters” to my products? (Categories, attributes, etc.)
- Is There a Difference Between Taxonomies and Categories?
- Related Tags not in category
- How to show a list of only categories (exclude subcategories)
- get all categories’ latest post in one query
- Get Categories of multiple posts
- How Can I Display the Category Description in a Theme with no Category.php or Archive.php?
- WooCommerce – Get products from category right before deleting category
- omit categories from main navigation menu
- How to relocate images
- Category next page link not working
- Page Type with Category Link
- Display post of current parent category, and in right hand side show child category post
- Category pagination not working in category.php please help me
- Print the associated categories of the current post starting with parent (with option to remove href)