I am trying to use pjax in wordpress . but whenever I try to click the link which fetches the content via ajax call , nothing happens and page loads normally, firebug console show 301 aborted error . Any one can help ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
if you are using ajax in wordpress then make the action in function.php file of your theam , like below example
add_action('wp_ajax_do_ajax', 'our_ajax_function');
function our_ajax_function(){
// now we'll write what the server should do with our request here
}
Hope it will Help :)