add this before your other add_action call:
add_action('wp_ajax_nopriv_zephyr_infinite_scroll', 'zephyr_get_nextpage');
the wp_ajax_
filter runs only when you are logged in. wp_ajax_nopriv_
runs only when logged out. This is so you can separate your requests, and maybe treat them differently, if that’s the case.
Check wp_ajax_(action)
Related Posts:
- Help add ajax load more button
- Using infinite scroll ajax load more with search parameter
- infinite-scroll for 2 fixed height containers
- Infinite Scroll
- AJAX loading with custom parameters
- How to add to cart via AJAX Woocommerce [closed]
- Including WordPress in RESTful API
- How to tie built in AJAX to an add_action?
- admin-ajax.php vs .load() in WordPress
- Ajax form submission from admin panel
- AJAX call using admin-ajax URL is returning 400 bad request
- Ajax response is always 0
- Ajax with OOP doesn’t work
- Error 400 bad request using admin-ajax.php
- Ajax is not working for logged out users
- WP Ajax Action Not Picking Up Query String Parameter
- How to use wp_send_json_error?
- Ajax Redirect role = ‘Editor’ to their Dashboard after register
- WordPress AJAX Call Not Return Result
- Form data is empty while posting form through ajax using jquery in WordPress
- load next and previous posts by Ajax and URL update
- How do I check if AJAX nonces are implemented correctly?
- WordPress Ajax Problems
- Force redirect not logged in user to (wp-login.php or wp-admin) for specific page
- How to insert a record by clicking on the link using AJAX
- How can I access the Header of and ajax response from the rest API
- Getting back to ajax search results from a page
- Updating a checkbox value to database for specific row in table
- WordPress Ajax Not Working ( Custom Admin page)
- WordPress ajax success response
- Admin WP List Table Columns Missing
- (updated) How to add AJAX error handling to a (fully) custom registration form?
- Load JavaScript from a post that’s loading into Fancybox via ajax
- Gravity form Load By Ajax Cannot Submit – Error 400
- wordpress admin ajax url rename
- rest_no_route custom route
- Cache wp-json/posts without a plugin?
- What is the best way to do MyAjax error and success handling?
- Gravity Forms closes my popup on Validation Error [closed]
- “Loadmore” button is not working in buddypress [closed]
- Uncaught ReferenceError: the_ajax_script is not defined . How is this not defined?
- Interim-Login form on frontend
- Ajax call does not work for this simple code
- WordPress ajax call returns a zero though die()
- Save value from Javascript object to WP user
- wp_update_post onclick button using ajax
- add Additional class to woocommerce cart-contents link
- Ajax insert or update data
- Check ajax triggered from front-end or from dashboard
- Localize script not working
- Add Ajax to rating button
- Why, if a function accepts arguments, it fails on ajax calls?
- wp_ajax declaration confusing for Front end
- Delete ACF repeater field row on Front End
- No errors in the console but Ajax call doesn’t seem to be working
- Preprocess submitted data
- Update status, meta while inside a post using AJAX button
- How to disable drag-and-drop upload function in Media Library?
- Can’t retrieve any content from Ajax-loaded page
- adding ajax load more to display images from meta box
- update_option in WordPress AJAX
- ajax in admin menu
- admin-ajax.php not loading anymore
- How to load dynamic option with ajax
- How do you use do_shortcode via AJAX call?
- Auto-suggest to display meta-data, but not to include it upon click
- Register Template
- Loading pages via Ajax and displaying titles
- Ajax Favorite from foreach (how to specify which result result is processed)
- change wordpress pagination url after doing the request
- How to send automatic response after form submission without plugin
- Refresh Gutenberg with JS for it show updated post
- How to Object.freeze wp_localize_script
- How to return a record from a custom table by sending an AJAX request
- WordPress New Post via ajax call
- 400 Bad Request getting on AJAX Call
- admin-ajax.php 403 errors – no caching, permissions are fine
- React to AJAX adding to the page
- gform_after_submission does not work on ajax enabled form
- Issue developing an AJAX form with WordPress
- Ajax call not working anymore
- Ajax global variable is not getting saved (returns null)
- WP admin ajax Pagination issue
- Calendar month navigation in Ajax only working once
- 403 error for ajax POST request
- Why function called by admin-ajax executes synchronously?
- How modify comments metabox on post edit screen in WordPress?
- my ajax action doesn’t get hit
- Strange AJAX problem (SOMETIMES works in Chrome/FF, ALWAYS works in Midori)
- How to check for dependencies for a specific page and enqueue them
- Get Page Type (Category/Tag) Using AJAX
- Ajax Form data is not posted back to the get_results()
- Data from ajax not updating post meta
- Remove dashboard access but allow ajax file upload
- fail to load /wp-admin/admin-ajax.php locally
- BBPress AJAX problem
- Ajax Slideshow in Post
- wordpress ajax always return 0
- WordPress wp_localize_script nonce and ajax URL
- Can’t have two simultaneous charts using Apex Charts