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
- WordPress Ajax always returns a 404 error
- problem with ajax and the path to the php page
- How to use wp_localize_script in a WordPress page other than functions.php?
- Real time Duplicate title check
- Update WordPress Custom Field with AJAX on cached page
- Targeting single page with JS
- Use ajax to update_post_meta
- Click loads template via ajax
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- How to speed up admin-ajax.php in wordpress
- Returning a value from a PHP page
- Stumped – Ajax Response Returns 0
- Sending jsPDF documents to the server
- 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?
- AJAX request status 200 but no actual “response”
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- AJAX pagination, update current page
- Save Search System
- adjust section according to country?
- populate form fields in a loop with ajax
- dynamic dependent select dropdown
- 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?
- 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
- How to disable controls in theme customizer?
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- How do I Import / Upload Files with jQuery AJAX?
- WordPress Ajax Call inserting data but success response false
- Ajax contact form return 0
- AJAX – Returning Two JSON Objects with One PHP Function
- Unset session variable on page reload / setup but exclude AJAX
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress Ajax Always returning 0
- Function won’t run onclick using Ajax
- WordPress plugin admin page – using WordPress function in linked php file
- A $_POST should occur when submit form but is not?
- My jQuery Ajax form submit is still refreshing page?
- jQuery Ajax PHP function call returning [object Object]
- Shortcode to pull posts
- Unable to Call More than One Meta Box Output
- Execute Jquery when a specific page in my plugin is loading
- Post meta select input, if statement
- what does $options = get_option(‘test_theme’); do?
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- How to load previous or next attachment with jquery ?
- Validating an email input from form field before submit using JQuery, AJAX, and PHP
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- jquery & ajax getting data from php in wordpress . admin-ajax.php returns 400
- Failed to load resource: the server responded with a status of 500 (Internal Server Error) through wp_admin_ajax.php
- Ajax filter with loadmore button
- Admin-ajax.php 404 error
- How to pass values from one function to the other using an array variable
- How to change PHP variables with AJAX request in WordPress
- Update $wpdb query with AJAX
- AJAX to add to cart multiple products woocommerce
- wp_set_object_terms returns 500 error when called through AJAX function
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- WordPress ajax filter returning all posts when it should be filtering by category
- 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 can i get the same ajax result using WP REST API instead of admin-ajax?
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- Find the method which AJAX GET calls
- AJAX Filter WHILE Loop not working WordPress
- WordPress 404 when using AJAX to call php function
- wordpress ajax pagination
- how use php query in AJAX jquery
- Ajax Load more CPT via shortcode
- Why I’m Not Having Access to “$_POST” Data Outside My AJAX Callback?
- Submitting my form to the database and then redirecting to payment site
- Pass the updated value of aid from form using ajax
- 500 (Internal Server Error) of external php file
- Use jQuery and AJAX to get HTML
- Adding instant search to wordpress page
- If custom field doesn’t exist, or exists and it’s true show title?
- Dynamic Gallery
- best way to communicate between php and jquery/javascript
- Loading a post’s content, into a div outside the loop, when it’s title is selected in a list
- Fatal error: Uncaught Error: Call to undefined function wp_nav_menu()
- AJAX: WordPress filters inside $html do not work as intended
- Why not showing all post by default in my jquery filter
- Jquery autosave text area after typing
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- notify users when changed database
- Save Edit button then disabled readonly metabox
- getJSON response to PHP
- Upload multiple files via ajax from an HTML file input