We have added the code for the Related blogs. Please add this code to your blog template and you can add this code to your custom module also. Now I have set the limit=21 if you want to edit just replace the values according to your need. Refer screenshot
Many thanks for the quick responses and great solution!
This solution is splendid! But only one thing we wanted to resolve.
There are the top 3 questions we struggle to understand...
1. So our scenario was - we had 10 blog posts and via calling this {% related_blog_posts, no_wrapper=True, limit=21 %} we wanted to see exactly all 10 records on the page.
But we were getting only 7 of them for some reason..
So we wanted to know exactly what was the reason, some mistakes of using it from our side? Do we have any conclusion on this?
2. If we just want to have 10 blog posts from 10 blog posts, then why we have to add some special formatters as {% related_blog_posts limit=21, post_formatter="recent_post", no_wrapper=True %}? Does recent_post formatter make any trick on items count? As we know - it just helps to format the markup for each item in the collection..
3. Is it better to use limit=10 if we have 10 blog posts? And then, if we have 11 blog posts we need to change it to 11?
Ok, then what is the max value for limit, if we want to show for e.g. 100 or 200 blog posts or even more?
1. The related blog post function scores blog posts on their relation to the current post/page. If a post is determined to have no relation, it won't be shown. That's why @webdew used recent instead because it will show all recent posts up to whatever limit is inputted.
2. The post_formatter can also be used in the related function. It is simply a way of telling the code how you want the posts to be visually shown on the page. Without a post formatter it would simply output plain text.
3. Yes, if you want just 10, set the limit to 10, but use recent instead of related else you possibly won't get the full 10 if they have no relation to the current post/page. I believe the limit for blog functions is 200 posts.
If this answer solved your question, please mark it as the solution.