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
- Get the children of the parent category
- How to remove the term “category” from category pagination?
- How to add featured image for category (without a plugin)?
- How do I get the category URL from get_the_category?
- Deleting All tags except categories Wp database
- Action hooks returning old category instead of new category
- Category checkboxes in upload modal
- How do I change the sql query for wp_get_archive()
- How to put enctype=”multipart/form-data” in categories form?
- What is the advantage of using header-catname.php over is_category(‘catname’);?
- Custom WP_Query for current category (in category.php)?
- Why is get_the_category() saying that I have two categories?
- Custom sidebar on category pages
- Insert Into Sub-child Menu
- How do I get the category slug from wp_dropdown_categories
- Change the category of all posts in it
- How to hide some categories in category list under post in wordpress?
- exclude categories from search results
- Read GET parameters in APACHE Mod Rewrite rules for WordPress categories in Posts
- How to categorize posts under Category 1 and Category 2 which are separate lists of categories, and display them as separate lists in widgets
- Creating Category Specific menus
- Category archives with monthly pagination
- Older entries link within category page
- How to do some action weekly?
- How to hide child categories from displaying
- How to allow Category Title to use tags?
- List Child Categorie and hide the parent
- Multiple selection for wordpress widget
- Notice: Undefined variable: category_id
- Is it possible to create an alias/custom taxonomy for a category name?
- I need to exclude from a query a category and a few custom taxonomies
- Multiple category columns and post counting list in wordpress Homepage
- add current-cat class to single post page
- Problem with pagination block in Gutenberg
- Product category display in tabs
- Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
- Pull in an “Include” file based on a WordPress Category ID
- Sort categories by custom field in WordPress admin
- Why is URL Slug Saving Differently From How It’s Been Defined?
- Related to genre and category
- Get permalink to latest post in category
- How to noindex, follow a specific category wordpress?
- How to load terms of a custom taxonomy of a product in woocommerce cart page
- AJAX load more posts not using correct category and repeating the same few posts
- Group Posts by First Letter of Title categories
- Alphabetize all but one category
- Printing direct descendants of a category with WP_Query
- Listing category
- Anyway to hide a Category in the Categories section when adding/editing a post in WP Admin?
- Showing one post from each category, paged?
- Weird html output of single_cat_title – is not inside of the html element?
- Limit authors on specific catogories