usually it because you are missing an “add_action” call for none logged in users.
add this to your plugin or functions.php
add_action('wp_ajax_nopriv_REPLACETHIS', 'ajax_get_date_post');
and change the REPLACETHIS to your action value from the ajax call.
remember that when calling ajax from front-end and you want to allow none logged in users
to make these calls you allways add both:
add_action('wp_ajax_my_action', 'my_action_callback');
add_action('wp_ajax_nopriv_my_action', 'my_action_callback');
you can read about more at the codex
Related Posts:
- Fire query on ajax post url page
- How to print the excuted sql right after its execution
- Pagination with custom SQL query
- Return only Count from a wp_query request?
- how does $wpdb differ to WP_Query?
- wp_query->max_num_pages always returns 0 on custom post type
- Is it true $wpdb->get_results is faster than WP_Query in most cases?
- ajax category filter
- next_posts_link not working for loop called with ajax
- Query causing load because of SQL_CALC_FOUND_ROWS post counting?
- Ajax and WP_Query/tax_query parameter
- Use WP_Query with a custom SQL query
- Load more AJAX on WP Query
- WP_query is not returning the expected result
- WordPress dynamic AJAX query
- ajax wp_query conditional tags not working
- I need to run a AJAX Fuction from within a WP_Query but only works on first item
- Change post query onclick
- Add AJAX “Load more” on custom query block
- Disable (or limit) queries when certain content (or data) is not needed (or showed)
- get_var is neither a string, integer, or array …?
- How to filter a static post page with ajax and $wp_query
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- how to translate countries output from wp database?
- wpquery via ajax
- Ajax (jquery) wp_query pagination returns -1
- What’s wrong with this wpdb query?
- How to pass the current content of $wp_query to a new page?
- JOIN filter doesn’t work in WP_Query in wp-ajax calls
- WordPress AJAX Request returns 400
- WordPress Ajax form filter | Search by title with ajax form, breaks the other filters
- duplicated posts when using pagination
- Passing a SQL query to the WP Query
- Why when I using infinity scroll the one post loads over and over?
- Using Ajax and WP_Query to load more posts on category page fails
- Save queried result into database
- Any way to use FETCH_KEY_PAIR with $wpdb?
- WordPress live search and filter custom fields
- WordPress live search and filter
- Doing $wpdb->get_results returns NULL, doing the same query in my DB returns correct value
- Filter admin ajax data by url query
- WooCommerce | AJAX | Product Pagination | Help me implement Ajax Pagination
- Move some posts to end of sort order, even if there is a sort in the wp_Query already
- How to get user avatar via WPDB
- Finding post ID dynamically on click
- Ajax buttons not working properly in WooCommerce when using wc_get_template_part
- Load WP Query with Ajax
- remove_action – pre_get_posts – does not restore original query
- In which file to use $wpdb and its functions for database operations and queries in wordpress?
- Order & Orderby clause not working with custom query
- Is instantiating WP_Query not possible within an admin Ajax call?
- WordPress conflict with multiple load more posts functions on click
- WordPress custom query by archive title
- Show All with Isotope
- Search Filter With Custom Taxonomy and Custom Fields : How do I handle it via plugin?
- What argument does my function need to echo get_results() query results
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- modifying the loop multiple times with arguments passed through ajax to wp_query
- complex query question
- Select Unique Posts for a List of Tags
- Fetching $_POST from Page Template into functions.php
- How To Use WP_Query To Get The Custom Post type Posts With Keywords
- Include post_status check within $wpdb query
- wpdb get_results() returns only 2 rows
- WP_Query for liked posts is showing all posts if none are liked
- Declare inline background image in functions.php
- How to get query results for the next page
- How to solve this script problem in theme directory?
- I wan to process the following js to process the AJAX Request on my function to calculate author Total Post views
- WordPress WP_Query offset parameter not working with search parameter
- Optimising amount of calls to custom fields
- Why is $wp_query fetching nothing?
- pre_get_posts or $where, which one to use?
- Inline Ajax call after term is appended with a @ or # etc. displayed in div
- Slow getting posts from category
- Search Query that Includes Custom Table
- Sorting Posts Based On Meta Value Using AJAX
- How return normal search result using wp_ajax action for wordpress
- Custom query (author is post_author or meta co_author) with Pagenavi pagination
- WP_Query search by multiple meta key and distance
- Different sql queries count indicator on the main page [closed]
- wpdb LIKE request shows all database data
- Convert a WP Query into a simpler SQL query to fetch only COUNT of posts
- Duplicate posts showing up in loop using infinite scroll
- How much does $wpdb->prepare(), then $wpdb->query() VS straight $wpdb->query(), can slow down the load time of whole page
- how to use transient method?
- Adding arguments to WooCommerce Product Loop using AJAX
- Refresh wp_query with no changes
- get_post_meta bringing back results, but $wpdb->postmeta doesn’t
- WordPress WP_User_Query ignores the `meta_query` when called from an Ajax function
- AJAX search function resets wp_query vars
- WordPress Ajax search filter on dropdown select
- AJAX multiple search boxes not merging with array merge
- Is there another way to retrieve a post_id from post_meta other than a SQL query?
- How to use wp-query to search for posts where post_content OR post_title OR post_name
- Applying a custom query for the AJAX “us_ajax_grid” function (from WPBakery)
- Optimizing AJAX Query with Large Database
- WP_query with ajax filter not working with input fields
- WordPress DB query
- WP_Query offset returning duplicate posts from previous loops with AJAX