Try to output the debug query
Find fragment
$the_query = new WP_Query( array( 'posts_per_page' => 5, 's' => esc_attr( $_POST['keyword'] ) ) );
if( $the_query->have_posts() ) :
Replaced by
$the_query = new WP_Query( array( 'posts_per_page' => 5, 's' => esc_attr( $_POST['keyword'] ) ) );
echo (string)$the_query->request;
if( $the_query->have_posts() ) :
Perhaps some hooks are triggered to find a guest. i checked – your code is working
Related Posts:
- Ajax action has 200 status but response of No response data available for this request
- ajaxurl not defined on front end
- Why does WordPress add 0 (zero) to an Ajax response?
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- Saving data-URI to media library
- Nonces can be reused multiple times? Bug / Security issue?
- How can I run AJAX on a button click event?
- How-to implement admin Ajax inside an admin WP_List_Table?
- How to make dynamically-generated content searchable in WordPress?
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- Empty POST data on server on AJAX request using Angular $http
- Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
- Data not insert and update through ajax and jQuery in admin page?
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- WP ajax requests not stacking?
- How do I get rid of my inclusion race-condition on wp_enqueue_script
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- AJAX button with success callback. (Titan Framework)
- ajax working when function is on child theme but not in plugin page
- AJAX call to admin-ajax.php by subscriber returns home page
- AJAX call returns ‘testtest0’ instead of ‘test’ – why?
- Ajax function is not working on WordPress
- About a programming language starts with [closed]
- Best practice for plugin: always detect admin-ajax call?
- add_action wp_ajax_ not loading in plugin file WP Network
- Why is the form not updating when I select a new sector from the list?
- Workflow for new importer plugin – your advices?
- Plugin Form Submitting to admin-ajax.php instead of admin-post.php
- Ajax +wordpress onClick link redirect to new page and create html content
- AJAX request not routing through proxy
- Get cat parameter from admin-ajax
- WordPress (pagenow link) in ajaxurl change after i change plugin language
- Ajax on the Administration Side of plugin – returns 0
- How to do admin ajax request in a plugin for rest api
- Showing results from json-string in WordPress search results page
- Jquery php request is returning a weird result
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- Posts form with AJAX request – Plugin development
- GET request return value as error instead of success
- How to control ajax calls without effecting memory of server?
- Bad request 400 using class based files
- Forbidden Error in ajax call with wordpress
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- ajax call return 406 not acceptable for non logged users only
- Does $this context change in an AJAX callback?
- Get search result count in plugin
- ajax response strips multidimensional array and unable to decode
- 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
- Rate limiting ajax requests in WordPress
- WordPress Ajax not returning Response
- ajax-action.php can’t find added action
- Generate Static Page to Show Search Results/Detail for API
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- AJAX call of function containing javascript which is not loaded (Plugin development)
- Performing ajax request in wordpress
- Inserted data from database does not showing on front-page without referesh page?
- wp_ajax function return the html page
- $_SESSION inside php function executed by AJAX
- Two same AJAX calls – one is working, other doesn’t
- ajax multiple Values
- How to include files in the loop via ajax
- How to handle ajax Request in a complex-structured plugin?
- Using JavaScript in WordPress page to call for server data using AJAX
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Filterable posts using categories
- How to get values from Tinymce visual editor popup?
- Ajax Response Error | just getting error as the response
- How To do Ajax In WordPress Custom Plugin?
- PHP includes with AJAX actions
- admin-ajax.php returns “No Script Kiddies!” sometimes
- Modify search form with plugin
- WordPress function is not called and ajax return 0
- WP Query Relations / Compare
- Ajax call not working with
- Ajax functionality not being called under wordpress plugin
- WordPress Search Form with Keyword Suggestion
- Array/List Edit in Backend
- WP Ajax on page load not working on bluehost but was working on Godaddy
- Ajax not working to insert, query and result data
- WP Cron as Fast as WordPress AJAX?
- Simple Search Plugin Does Not Perform Search
- How to search on the field that stores escaped strings?
- Change the search results header from plugin
- WordPress plugin: admin-ajax.php not passing data to custom function
- Can’t get query string in ajax call
- How to create a custom search form and handler?
- Get custom wp_query search results to appear on search.php
- Ajax url value to pass ‘variable’ to use in query
- Ajax functions – no access to wp-admin.php only online
- An adiitional function fires on my AJAX submit
- Fatal error: Call to a member function query() on a non-object in my ajaxpage
- Page reload occurs before request finishes
- PHPUnit Ajax Serialization of ‘Closure’ is not allowed
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Return custom product in ajax call loop
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- Why is WordPress wrapping search for users that looks like integers with asterisks and how do I fix it?
- WordPress plugin boilerplate AJAX functionality
- Hook a search form anywhere on the site, using a custom plugin