Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php echo get_post_meta($post->ID, 'client_logo', true); ?>
- ( function( $ ) {
- // AJAX loading client information
- var page = 1;
- var loading = true;
- var load_posts = function(){
- $.ajax({
- type : "GET",
- data : {'What should be here?'},
- dataType : "html",
- url : "link to php file which is return data? what should be at the php file?",
- success : function(data){
- } else {
- }
- },
- error : function(jqXHR, textStatus, errorThrown) {
- alert(jqXHR + " :: " + textStatus + " :: " + errorThrown);
- }
- });
- }
- // Load more posts on click
- $('a.popup').click(function() {
- loading = true;
- load_posts();
- return false;
- });
- load_posts();
- } )( jQuery );
- 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();
- }
Add Comment
Please, Sign In to add comment