how load content as pop-up using ajax

If you want to load PHP file through AJAX use the below code. function sendAJAX(){ $(‘#container’).load( “stuff.php”, // url { // json object of data to pass to the page stuff: “all your stuff goes in here…”, moreStuff: “even more stuff” }); console.log(‘sendAJAX’); }; Let me know, In case of any doubts.

Cookie nonce is invalid – Multisite

I found the problem. The links to the Network Admin are incorrect. For example, network users have: http://my-local-cms.dev/wp-admin/network/ It should be (if wordpress core is located in backend/) http://my-local-cms.dev/backend/wp-admin/network/ If you visit the first link and add /backend/ before wp-admin in the browser, then the network admin will behave correctly. Fix Edit 2017-08-30 New solution: … Read more

How to retrieve the content (with a specific ID) via ajax by clicking a link tag

I would put the action in the post data $.ajax({ url: “/wp-admin/admin-ajax.php”, type:”POST”, data: { action: “my_custom_data”, post_link: post_ID }, success: function (response) { console.log(response); $(‘#post-data’).append(response); } }); return false; ….. Then use $_POST[‘post_link’] in your PHP function my_custom_data(){ $post_link = $_POST[‘post_link’]; echo get_the_content($post_link); die(); }