Guest User

Untitled

a guest
Dec 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <?php echo get_post_meta($post->ID, 'client_logo', true); ?>
  2.  
  3. ( function( $ ) {
  4. // AJAX loading client information
  5. var page = 1;
  6. var loading = true;
  7. var load_posts = function(){
  8. $.ajax({
  9. type : "GET",
  10. data : {'What should be here?'},
  11. dataType : "html",
  12. url : "link to php file which is return data? what should be at the php file?",
  13. success : function(data){
  14. } else {
  15. }
  16. },
  17. error : function(jqXHR, textStatus, errorThrown) {
  18. alert(jqXHR + " :: " + textStatus + " :: " + errorThrown);
  19. }
  20. });
  21. }
  22.  
  23. // Load more posts on click
  24. $('a.popup').click(function() {
  25. loading = true;
  26. load_posts();
  27. return false;
  28. });
  29. load_posts();
  30. } )( jQuery );
  31.  
  32. add_action("wp_ajax_clientLogoPopup", "clientLogoPopup");
  33. add_action("wp_ajax_nopriv_clientLogoPopup", "clientLogoPopup");
  34.  
  35. function clientLogoPopup()
  36. {
  37. $clientID = intval($_REQUEST['client_id']);
  38. if($clientID > 0){
  39. echo get_post_meta($clientID , 'client_logo', true);
  40. // or you can also show other meta fields here.
  41. }
  42. die();
  43. }
Add Comment
Please, Sign In to add comment