CMS Development


Blog Pagination doesnot work when filtering by month

I have set "Number of Posts Per Listing Page" to 10 in blog settings. 


On blog listing page pagination works fine and shows only 10 items. But when I use month filter and it that particular month have more than 10 post it shows them all. 


Pagination works fine when I use topic filter. 


Has someone seen similar issue? Is there way to resolve it.

My Pagination Code is 

            <div class="blog-pagination">
                <a class="btn btn-default btn-lg previous-posts-link" href="{{ blog_page_link(last_page_num) }}" {% if !last_page_num %} disabled{% endif %}>Previous Page</a>

                <span class="which-page">Page {{ current_page_num }} <span class="sep"><span>of</span></span> {{ contents.total_page_count }}</span>

                <a class="btn btn-default btn-lg next-posts-link" href="{{ blog_page_link(next_page_num) }}" {% if !next_page_num %}disabled{% endif %}>Next Page</a>
2 Replies 2
Key Advisor

Blog Pagination doesnot work when filtering by month



In your blog listing markup there is a HubL if statement:

 {% if not simple_list_page %}

{% else %}

{% endif %}

Your regular blog markup will be in this if statement with your pagination. Filtered pages are considered "simple list pages" so they would use the mark up in the else section of the statement. If you want all of your listing pages to use the same markup then you can remove this if statement and everything inside the else section of the statement. Then your blog will use your normal markup including the pagination. 




Blog Pagination doesnot work when filtering by month

The Month filter acts similarly to the view all posts. So it will display ALL posts assiciated with that month. There is no what that i know of that will allow for pagenation in the filter by month view.