I’m currently building an Ionic app that uses the WordPress api. I can retrieve posts in a specific category by using the following:
// Retrieve filtered data for the categories to show posts.
function getCategoryName(categoryName) {
return ($http.get(svampeURL + 'posts?categories=" + categoryName).then(handleSuccess, handleError));
}
The problem is that it only returns 10 as it is some sort of default. I have tried using the per_page=50 argument but it doesn”t seem to work. I have also read the documentation of the api and it seems like they don’t describe this scenario.
Is there any way to get more than 10 posts in a specific category? How do I change this default return?