Load More Posts Ajax Button in WordPress – fix

On this page from author @dingo_d I found one of the best option to load more post with ajax. but I think there is one issues. I really appreciate if author or somebody else can help me…

This part of code not work, I am not sure is this just for me or this code not work at all .. so in function.js we have this

Read More
var ppp = 3; // Post per page

and in load post this

var str = '&cat=' + cat + '&pageNumber=' + pageNumber + '&ppp' + ppp + '&action=more_post_ajax';

in function.php we have this

$ppp = (isset($_POST["ppp"])) ? $_POST["ppp"] : 3;

and everything else work just this variable ‘ppp’ not working .. its always use this number ‘3’ from function.php .. and if I wrote for example number ‘5’ in function.js its still will show 3 posts . I create exactly same files, queries and etc.. and everything work great, only this var $ppp its not work… can you please help me to see what is wrong with his code? Thanks

Related posts

1 comment

Comments are closed.