You have not told WP what to do with the AJAX request, add this line in functions.php:
add_action( 'wp_ajax_filter_posts', 'ajax_filter_get_posts' );
and remove the $taxonomy
parameter from ajax_filter_get_posts
as it serves no purpose.
Related Posts:
- How would I get a taxonomy/category list inside a Gutenberg block?
- Dropdown with category selection
- Load categories with ajax
- Saving two categories from two dropdowns in front end posting form
- Get id of category from drop down menu
- How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?
- How to retain the values from dropdown category lists after wrong form submission?
- Help with multiple dropdown tags search
- How to use wp_category_checklist()?
- wp_dropdown_categories and custom taxonomy + custom post type
- How to provide value for ‘selected’ on wp_dropdown_categories() for ‘multiple’ options
- Additional form options based on category selected not working
- Populate dropdown based on selection of parent category
- Select posts by name and category per REST API
- wp_dropdown_categories() scripts working erratically on sidebar
- Dynamic dependent Dropdown lists for categories, sub-categories and posts
- Pagination for ajax category filter
- ajax for filtering posts by category in wordpress loops
- How to use an array of categories as a dropdown?
- How do I display only two categories Instead of displaying all categories
- Dropdown Categories used in form shows no results when all is selected
- Trying to get variables in hacked category dropdown
- wp_list_categories walker without links on categories that have subcategories (to make a nested dropdown menu)
- WordPress Customizer: Dropdown with Category output
- Filter By Category Dropdown List With Custom Taxonomies
- A dropdown with checklist
- Wp Dropdown Category Not Show Current As Title
- wp_dropdown_categories initial value
- How can I use AJAX with check-box categories?
- Exclude category from drop down list form
- Trying to get categories and sub-category listing
- Get_term_meta() always returns false
- Woocommerce Category Sort Dropdown
- Ajax load more not working with multipler categories
- How to add custom option to wp_dropdown_categories?
- Ajax Category add doesn’t update the list table custom column
- Filter custom taxonomy posts via AJAX
- custom browse by
- Ajax Response Error
- Get category fixed in dropdown browse categories
- Categories dropdown with all values selected using wp_dropdown_categories
- add custom option to get_categories dropdown
- Taxonomy for custom post type not found
- Ajax call activate after submit in edit-tags.php page
- Bringing Ajax Loading Feature on Category Pages
- Form Value of drop down category + Translation of ‘show option none’
- Display post content from category name using ajax
- Remove “?category=” in the URL wordpress ajax filter work for category
- Fetch Post Category
- WP_Query with multiple categories unexpected behavior
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- Is There a Difference Between Taxonomies and Categories?
- List all subcategories from category
- How To Find Out WordPress Category Table in MYSQL?
- Add custom field to Category
- Get Category ID inside Category template
- Only one category per post
- WordPress Multisite – global categories
- Get the children of the parent category
- Get posts from sites in Multisite?
- WP REST API: filter by category 1 AND category 2
- How To Get Parent Category Slug of Current Post
- Display All Products by Category with WooCommerce
- What is the difference between a “tag” and a “category”?
- Is there an easy way to make a meta box have the tabs like the Categories meta box has?
- How to check if I’m on the last page of posts?
- Display posts from the same category using next/previous post link
- Can I set a default featured image for a category?
- Check if a post is in any child category of a parent category
- How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms
- Force category choice before creating new post?
- Gutenberg editor add a custom category as wrapper for custom blocks
- WooCommerce: List All Categories
- How to get category and archive title?
- Get category ID from category slug (not working)
- How do I remove “Uncategorized” from posts with more than 1 category?
- Get rid of WordPress category, tag and author archives?
- Individual rss feed entry length for categories?
- How can I create a category landing page followed by pages of posts?
- Remove parent category from permalink? Basically only have the child category?
- Custom permalink structure leads to be 404 on pagination
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- Posts URL structure like site.com/category/the-post-title
- Can’t custom taxonomies have same terms (slugs) as categories?
- How to get permalinks with category base working with sub-categories
- How to remove the term “category” from category pagination?
- Using wp_category_checklist in a widget
- WP 3.9 TinyMCE no longer loads on category description editor
- On the category page, get the category object
- Get only the top level categories using get_categories() without foreach loop
- Get all categories and posts in those categories
- How to add featured image for category (without a plugin)?
- How to create a custom sort for WordPress categories
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Category archive by year with permalink support /category/YYYY
- Best Way to Redirect Category to Page and Hide Category
- get_terms vs. get_categories: does it matter?
- What is a good robots.txt?
- Allow users to create their own feed from selected categories?
- Hook when category is added to post