I have never actually learned how to create a blog or anything the like up to now. I would like to create a personal portfolio/homepage, which will load older articles as soon as the user pushes the "load more" button. Now, I have it all set up, but I don't really know how to keep track of the oldest article ID.
As mentioned, here I load articles from a php script via AJAX.
$('#more_articles_button').click(function () {
$.ajax({ url: kBaseUrl+"content_loader.php",
data: {
action: 'load_more_articles',
article_id: 'insert_lowest_article_id'
},
type: 'post',
success: function(output) {
$('#articles_container').append(output);
}
});
});
Here I would like to get the last article's id and send it to the php script. How do I get hold of it ?