I am by no means an AJAX expert, I have only ever used for pretty much what you are needing it for. It can be quite a lengthy explanation for a forum post. But when I was trying to achieve the same thing the first time, I found this excellent YouTube video series (5 parts) by Brandon Brotsky on how to filter custom post types using AJAX. Even if your only filtering regular posts and not using ACF, you should be able to use his method to filter posts by date or title in ASC or DESC order. Actually it should be easier than what he is doing in his video.
https://www.youtube.com/watch?v=e5tUkHczcVE
I know it’s probably not the answer you were hoping for, but I think you will find his video helpful to some extent.
Related Posts:
- Random sort within an already sorted query
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Exclude posts with specific meta_value while sorting by a separate meta_value
- AJAX filter posts by year
- Ajax load more button in Recent posts widget
- WP_Query with ajax handler returns the same posts
- Random ajax load only works with posts_per_page set to -1
- how can i change WP main archives loop to sort by name or title
- how to get post order by post id wp_query?
- wp_query with ajax
- How to sort WP_Post Object array by object field in php?
- WP_Query extended with AJAX
- Sort / Filter Queries
- custom sort posts in archive/taxanomy page
- Implement AJAX ‘load more’ with offset posts
- How to : pagination in 3 different custom loops on the same page
- Send post id through ajax and get the post content back
- How safe is renovating $wp_query when doing WP_Query pagination in Page Template
- Exclude the first ‘n’ number of posts of a tag from home page?
- Query posts and return XML
- Using ajax on editing a category edit page?
- how to change the number of posts returned in a specific loop without making it global?
- How to display posts via custom taxonomy terms using checkboxes?
- Query Posts With Over 1000 Views
- Dynamic dependent Dropdown lists for categories, sub-categories and posts
- posts_per_page option limits the number of Gallery items
- List authors with the last post title and order by last post date
- How to order posts by meta_value and title
- Auto-realod with new posts // Ajax call
- wp_query random post
- wp_posts table: safely remove unused columns to save database storage
- Query Posts by Custom Field
- Adding a blog archive with pagination using WP_Query
- How to get Tags with specific post id
- Using wp_list_pages() after calling query_posts()
- Possible to alternate between two loops
- Nested WP_Query breaking loop
- WordPress query_posts by tag doesn’t work anymore(?)
- Dynamically switch template on click
- How to display all posts divided/ordered by post date? [closed]
- Why Query is returning empty array?
- How do I extract just the post ID of the first item in whatever WP_Query returns?
- Show post content and title in diferent divs using WP_Query using a loop
- Why are my paginated posts always returning the same results?
- Ignore latest two posts
- Is it possible to use WP_Query to only pull posts with attachments?
- Show posts by author of membership level (Paid Membership Pro)
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- meta_value timestamp older than now
- Every second post different class in blog view
- Sort Custom Post Type by Category ID then Post Name
- Loop doesn’t exclude the specified category in home page
- Get posts with multiple categories
- Do not show children of a category
- Display posts of specific category term
- Print out last 3 blogposts
- why the same code got different results when using query_posts in functions.php and index.php
- Query posts by Author and/or by Tag
- Query for first 3 posts to change the look and feel
- How to get posts published on the latest date?
- Why posts array is empty?
- Can’t understand why sometimes a [caption] field appears
- Lock post editing to one user at a time – wp_check_post_lock
- Page and post loop same template
- Getting blog pagination to work on page set as front page
- How to group only VISIBLE posts? [closed]
- How to check in functions.php if there is data in a WP_Query?
- Shortcode with ‘year’ parameter
- search blog posts by author first name and or last name
- Show metabox value last post excerpt, title and link
- On what hook can I get the queried object’s final state?
- unique post in “$args” of wp_query display more than one post
- Display current post position in Elementor Posts widget
- Post filtering is returning blank page
- Why in my query is display two title?
- Migrate posts from category and sub-category via SQL
- How do I insert a after every 5 posts in a WordPress Loop that infinitely loads posts?
- How to give classname to post if post has no content?
- Sort by last word in title
- Custom wp-query in wordpress rest api
- WP_Query: Show 10 posts in date order, first three random
- How can I insert a new markup element after 4 posts automatically? [closed]
- Exclude some posts from displaying in wp_query based on some condition
- posts_per_page returning only one post
- Call current post URL in ajax
- How to use a dropdown to filter posts by custom field
- If no posts exist for current day and month, show the next available day of posts
- WordPress Loop: How to display recent posts in multiple divs
- Random posts that always include a particular post?
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- Related Posts function not working
- How to retrieve certain number of images from a wordpress post?
- WordPress post filter menu
- After ajax image is outside the “ tag
- How to display post list in a table layout (multiple queries in single loop)
- Conflict array_splice on loop and query in widget
- Retrieve post in AJAX Callback
- Not all posts showing in query
- how to handle the loop using filling bootstrap grid structure?
- Get all custom posts with a certain taxonomy