Нужно подгрузить контент из другого файла в div с классом .content
$('.pages_list a').click(function(e){
e.preventDefault();
var postId = parseInt( $(this).attr('data-catid') );
postviewCountGet(postId);
});
function postviewCountGet(postId){
$.ajax({
success: function(html){
$( ".text" ).load( "/posts.php" );
}
});
};
В корне сайта есть файл posts.php
<?php
echo "result";
?>
Вот его содержимое нужно вывести в блок с классом .content. Выдает ошибку
jquery.js?ver=1.12.4:4 GET http://hitechbuld/posts.php 404 (Not Found)
На самом деле файл posts.php есть в корне сайта. Как этот вопрос решить в WordPress ?