you can use ajax url creating methode of wordpress.
add_action("wp_ajax_clientLogoPopup", "clientLogoPopup");
add_action("wp_ajax_nopriv_clientLogoPopup", "clientLogoPopup");
function clientLogoPopup()
{
$clientID = intval($_REQUEST['client_id']);
if($clientID > 0){
echo get_post_meta($clientID , 'client_logo', true);
// or you can also show other meta fields here.
}
die();
}
write above script in functions.php of your theme
now call the url as per your requirement like this,
http://www.your-website.com/wp-admin/admin-ajax.php?action=clientLogoPopup&client_id=
Related Posts:
- update_post_meta Not Processing Array Data (Not Sure What I Am Missing)
- Remove item from post_meta array via AJAX
- How can I fetch loop of post titles via AJAX?
- Retrieve POST data from AJAX call
- Do I require the use of nonce?
- WordPress Ajax always returns a 404 error
- problem with ajax and the path to the php page
- Security – Ajax and Nonce use [closed]
- Looking for a better way to handle an ajax script that pulls in post data on click
- Targeting single page with JS
- Can’t use get_results() in ajax query
- Use ajax to update_post_meta
- Problem with WordPress Ajax form
- Click loads template via ajax
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- Passing jQuery value using Ajax to a page template
- ajax_object is not defined when ajax calls the function
- How to speed up admin-ajax.php in wordpress
- Why is this Ajax not working?
- Sending jsPDF documents to the server
- Use ajax from function.php
- Ajax return code 400
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- How to test nonce with AJAX – Plugin development
- Checking for new message using AJAX and PHP. Server overload?
- How to select the contents in the text view textrea in wp_editor?
- ajax, right way to do it and make it works?
- WordPress ajax doesn’t display object method on jQuery .change() function
- Ajax loaded form replaces form action with Ajax url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- Ajax date_query not working past the first iteration
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- AJAX pagination, update current page
- adjust section according to country?
- Change “add to cart” button color based on Woocommerce product category [closed]
- Ajax request returns ‘Array’. How to output the actual results?
- How to add a do_action on refreshing of WP customizer?
- Setting value of session with Ajax not working
- [jQuery]Adding shortcode
- Display parent and child taxonomies in separate drop down select fields
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Fancybox type popup window that’s not an iframe
- WordPress admin-ajax.php 400 bad request
- Ajax contact form return 0
- delete post meta by AJAX
- AJAX – Returning Two JSON Objects with One PHP Function
- Pull GetOption() variable into jQuery dynamically created html
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress Ajax Always returning 0
- How to keep track of when a vote is cast?
- WordPress plugin admin page – using WordPress function in linked php file
- My jQuery Ajax form submit is still refreshing page?
- Shortcode to pull posts
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- How to store multiple custom meta box
- Output votes to div dynamically in wordpress
- Get uploaded image and attach it to the new post
- Admin-ajax php not working on new wordpress version
- Proper way to use WordPress function with AJAX PHP file
- Live search from database table
- Add a counter for mouseovers (custom field)
- Accessing an API with jQuery and AJAX
- How to set variables with AJAX request to use in another function in WordPress
- Search Ajax Call – Use Form Data in Response
- Why does PHP called with Jquery AJAX not allow additional php code to be added?
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Database entry removed on browser refresh, Ajax PHP jQuery
- jquery & ajax getting data from php in wordpress . admin-ajax.php returns 400
- How do I call a value from the datase using ajax
- Ajax result show in console if is called outside function and not showing in array
- Where to add my PHP codes for AJAX Jquery to work?
- How to change PHP variables with AJAX request in WordPress
- How to use wp_ajax_set_post_thumbnail?
- Can’t make lazy load for my site, help!
- How to reload a php script, using AJAX and jQuery
- wp_ajax_ 400 Bad Request
- Unable to update the meta boxes with multiple fields
- Input field duplicates on form submit by jQuery
- How to echo a PHP code into WooCommerce variation product?
- How to call a function from functions.php with ajax?
- Custom theme admin-ajax.php 400 (Bad Request)
- number of posts with “Load More”
- Find the method which AJAX GET calls
- Ajax not updating to database
- WordPress 404 when using AJAX to call php function
- Collect custom post in a calendar
- Ajax Load more CPT via shortcode
- ajax form with multiple submit buttons and values
- How to run ajax in WordPress Post?
- Adding instant search to wordpress page
- Add php function into .js file (for tinyMCE button)
- Fatal error: Uncaught Error: Call to undefined function wp_nav_menu()
- ajax form function error
- Load Meta box value into div AJAX [duplicate]
- send meta box input data without publish button
- Upload multiple files via ajax from an HTML file input