You have two options:
- Use
jQuery.ajax()instead ofjQuery.post() - Use
jQuery.ajaxSetup()to change thebeforeSendbehavior globally.
Reference: https://stackoverflow.com/questions/2257975/using-beforesend-and-complete-with-post
Related Posts:
- Ajax Load More Posts in Category Page
- POST from jQuery to PHP
- How to make comments work for a post loaded per Ajax?
- Dynamically add id to heading tags
- Confirmation box when submitting post for review
- How to load paginated post pages via ajax
- Getting the post_id in wp_ajax function
- Publish pending article from front end with a button?
- List latest posts in WP-Admin
- Restrict users from editing post based on the age of the post
- Change slug with custom field
- Load posts dynamically
- Restrict access to post if it is currently being edited
- Getting an alphabetic post list with two letters onclick on letter
- How to use oEmbeds on Post Content during AJAX requests
- Create new category upon save based on post information
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- which action to hook to in order to perform post-publish action
- Strange switch_to_blog() issue
- Handling an Ajax form submit
- Search widget breaks when using multiple loops?
- $post object is null
- WordPress theme ajax have_posts()
- The correct way to call posts with ajax
- Advanced Custom Fields – Storing array value for further usage
- How do I use Ajax to show the new posts realtime, on the frontpage
- str_replace the_title(); blues
- AJAX filter posts by year
- Accessing post->ID outside of the loop for listing child pages
- Add ajax load more function using WP API
- How to pass Post_ID variable from theme’s Single.php to custom Plugin using AJAX
- Ajax load more button in Recent posts widget
- WordPress Custom Fields (Checkboxes with multiple values)
- Ajax Dynamic Archives not showing correct results
- Send post id through ajax and get the post content back
- Creating a post from data returned from HTML form
- Using ajax on editing a category edit page?
- Auto-realod with new posts // Ajax call
- Display post category in foreach loop
- Dynamically switch template on click
- Page template is accessing the incorrect posts?
- Can’t get full post title if there a spaces in title
- Get post meta retrieving wrong value
- set post limit at load more ajax wordpress
- wp_query with ajax
- Call current post URL in ajax
- Incrementing PHP variable onclick to display posts by month
- Loading Posts & Category with Ajax
- After ajax image is outside the “ tag
- Retrieve post in AJAX Callback
- Using AJAX and PHP to load next post object
- How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?
- Display message depending on capability outside loop
- displaying the categories post
- Adjust the order for returned posts
- How To Use Custom Fields With .mp3 Links
- Defining ‘last’ class on foreach blog posts
- Categories Listing and Highlighting current category item
- A better code for no post format?
- Help Combine These Two PHP Codes
- Automate post update for all posts?
- duplicate posts with ajax load more wordpress
- My Custom Post Type AJAX Query is Returning no posts – why?
- Post form – AJAX won’t upload featured image – Plugin development
- Using AJAX to filter posts without refreshing page
- Unable to delete attached file from folder programmatically
- Javascript – How do I get specific post fields?
- Ajax: load content from post I clicked
- call to jquery ajax failing with 500 error when passing extra data field
- Many buttons not functioning in WordPress dashboard (as admin)
- AJAX load more posts not using correct category and repeating the same few posts
- Ajaxify Post Sort
- WP_Query extended with AJAX
- Ajax – Post Categories and Load More
- How to get posts from network blog
- How to limit the number of results for all query_posts on mysite
- Show a Category Specific Info Box
- How to get all the terms of a post
- Get first comment link on the post itself
- User driven content problems
- How can i retrive the movies, trailers, news in a single page using search
- How can I create a menu items from meta box based on users input
- How do I display a full post, not just an excerpt?
- Remove read more
- Adding a time stamp on post view
- List direct children of page
- Unable to get posts with category on my page
- wordpress radio button on single post page
- How *not* to show the last post on the latest posts list
- Create post from form with image
- Exclude a ‘portfolio’ custom category?
- Display a custom field rating system in the front end
- get value from post to sidebar
- Echo author slug in post edit page
- Ajax calls in wordpress
- Adding a content rating system
- WordPress Ajax load doesn’t work
- Display posts based on the selected category when no subcategory is chosen
- Code understanding
- /wp-admin/admin-ajax.php Error 500 while using divi premade layout in existing pages