2
votes

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

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

1
Woops, a typo! :O I'll fix it asap! :D - dingo_d
great.. and also thanks @dingo_d for great answer for Load More Posts with Ajax .. hvala puno :) - Davor Popovic
No problem, glad it helped :D Nema na čemu ^^ - dingo_d

1 Answers

4
votes

instead

 '&ppp' + ppp 

do

 '&ppp=' + ppp