The problem is your action names don’t match
In your frontend code:
?action=find_coach';
But in your backend code:
add_action('wp_ajax_search_coach', 'searchLifeCoach');
add_action('wp_ajax_nopriv_search_coach', 'searchLifeCoach');
search_coach != find_coach, they have to match.
Note that if this code used the REST API, it would have given a 404 and stated the problem in human readable language, e.g.
{
"code":"rest_no_route",
"message":"No route was found matching the URL and request method",
"data":{"status":404}
}
Related Posts:
- Initialize JS with an ajax loaded ACF form
- jQuery UI Autocomplete showing all results
- Is there a way to optimize function that is used for returning data in an ajax-call?
- Populating content dynamically via AJAX and Advanced Custom Fields [closed]
- WordPress search results with Ajax, get_post_type() not working
- custom autocomplete search
- post values to custom post type which has advanced custom fields
- Delete ACF repeater field row on Front End
- Can’t load search results with ajax
- Filter custom post types by custom field using AJAX
- Display full WordPress post under search form using AJAX
- Merge PDF files from post custom fields(ACF) into one PDF file and respond back the created PDF file, WordPress(AJAX Request)
- Ajax call undefined index
- Search function – problem with whole words
- Ajax a php file that has Advanced Custom Fields in it
- wordpress ajax search posts
- Unexpected WordPress search results
- Ajax live search, “No products found” when the title contains apostrophes and quotations
- Change search to outpout category name instead of Post type name
- AJAX loading with custom parameters
- How to cache json with wp-super cache
- Get Previous & Next posts by Post ID
- ajax – why multiple calls to wp_create_nonce() return same value?
- AJAX request on the frontend always returns 0 if user is not admin
- Admin Notification after save_post, when ajax saving in gutenberg
- Using ajax on categories and wordpress loops
- Cannot load admin-ajax.php. No access-control allow origin*
- WordPress Nonce Issue for Ajax Login and Logout
- How to modify wp_ajax function?
- Nonces and Ajax request to REST API and verification
- Vue.js + AJAX Shortcode
- Turn jQuery.ajax() request into XMLHttpRequest (vanilla JavaScript)
- Prevent page reload after ajax form submission
- WordPress Ajax Getting Response “Null”
- admin-ajax return error 400 for Chrome/Edge but not Firefox
- Is it safe to manually sign a user in using AJAX?
- WordPress Admin AJAX Serialize
- Include custom field in Ajax search WordPress
- Why a strange discrepency between get_current_user_id() when using AJAX versus output of document.cookie?
- Loading post template that contains a nested loop with ajax
- Long Polling: Stuck in while loop
- Show Post Content with AJAX
- Code run fast on a cronjob but slow with a do_action or ajax call
- update_post_meta using ajax
- Select posts by name and category per REST API
- Ajax comment form submit on frontpage alerts success but no insertion
- Search Tool only refreshes Page without showing results
- Wp mail does not work when Ajaxed to
- All AJAX requests return a 400 error
- Unable to successfully verify nonce
- Create custom POST Method URL
- POST Ajax bad request
- Getting a variable using $post ajax back from php to js response in WP
- AJAX Call – Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- WordPress is Not Setting PHP $_POST on Custom Ajax
- Include post content of linked posts in search
- bulk update meta value with ajax
- Ajax for subscibers not working
- Is it possible to determine whether a page is a page template by page_id in ajax call?
- Chained ajax call, second call returns 0
- How to stop being directed to admin.php after sending request to admin-ajax.php
- 200 return code on ‘POST /wp-admin/admin-ajax.php’ while NOT logged in
- i’m trying to get all my media query attachments via ajax in wordpress
- Distinguish between 2 instances of admin-ajax.php
- Next Ajax call doesn’t work
- Ajax page load without reload
- Custom field Search with Relavanssi
- need a confirmation text to appear on email submission
- How to make pages that arent indexed for ajax applications
- Why does reCAPTCHA v3 return 0 ? In custom AJAX registration form
- Need to search a custom field (ingredients, one long string per post), but want it to allow phrases/non-exact matches
- admin-ajax.php 400 bad request
- WordPress Ajax Page Load to skip embedded iframe
- WordPress POST AJAX call, var_dump($_POST) NULL and AJAX response empty when inside ob_start
- Set cors header for ajax requests
- Simple AJAX code that refreshes every x seconds?
- Change ajax live search results
- search form for custom fields
- jQuery ajax method does not return data
- Ajax and get_template_part
- Ajax is not defined
- Get posts by category via ajax
- Download doccument on server rather than clients browser
- WordPress 4.9.6 – IncludeMe & getAjax GET using wrong URL
- Create secondary Archive page format?
- Get post details with pure javascript ajax
- Use ajax without a plugin?
- Weird admin-ajax.php problem
- Ajax contact form returnig 0
- Can’t update WP Editor after Ajax
- Update user meta using Ajax on front end?
- retrieving page content per AJAX [duplicate]
- Posting to loop.php file
- Can’t access data from database using AJAX
- Running js in html code with same content
- How to get current_user_id from wordpress in node js?
- Making ACF fields appear in search results
- how can i create get request unis ajax without expecting return value
- Woocommerce ajax search can’t work on mobile
- AJAX call not initializing for non-admins in WordPress