Not loaded more than 20 post in WordPress Integration?
pritiJI opened this issue · comments
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Thanks :)
Recent post loaded only 20post in Wordpress Integration how to load website all post with specific category/tags?
Infinite Scroll working only for page1 and page2.
how to display 50post/100post with spinner infinite scroll?
Hi, the wordpress rest api has an optional parameter to set the amount of posts you want to retrieve. Default value is 10. You can read more in: https://developer.wordpress.org/rest-api/reference/posts/#list-posts
To change this value to 50 (to put an example) go to the wordpress service and go into the getRecentPosts function and add the per_page
param like this:
return this.http.get(
environment.wordpress_rest_api_url
+ 'posts?_embed&orderby=modified&per_page=50&page=' + page
+ category_url)
.map(res => res);
Because I posted the solution for your issue in #24 (comment)
Hi @pritiJI , can you please give me more info about your current issue?
what about using pagination instead of infinite scroll?