Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

How to calculate and display the number of blog posts in a summary block?



Hi all,

Is there a way to calculate and display the number of blog posts in a summary block with a code block immediately before/above the summary block? (if there is another solution without using code block, of course let me know. I'm just guessing its going to have to involve a code block for how and where I want the information displayed.)

For example, after filtering, I have 300 blog posts and set the number of viewable blog posts to 30.

Here's text that I put in the image below for the time being to show what I would ideally like to achieve.



I'm going to have hundreds of these summary blocks and blog posts will be added daily which will change the number of posts in a number of summary blocks. So as much as I'd like to simply add text, it will be hard to keep up of the various changes to the summary blocks.

One other important point. If I have less than 30 blog posts, the code would have to be adaptive to reflect this. So if I only have 20 posts, then the text should read "Showing results 1 - 20 of 20 projects".

This almost sounds impossible but I have seen it on another website so I imagine it has to be possible.




Link to comment
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

2 answers to this question

Recommended Posts

  • 0
15 hours ago, tuanphan said:


You will use this for Summary Blocks only or Summary Block, Blog Page, Blog Category Filter page..?

Hi @tuanphan,

For Summary Blocks and Blog Page.

I may have several pages with different filters used on the Summary Blocks.


Edited by Insider
new information
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...