Count total number of articles?

This is the right place to report general bugs, make suggestions or ask for help.
Post Reply
Posts: 19
Joined: Wed Jul 31, 2019 4:32 pm

Count total number of articles?

Post by miksmith » Tue Oct 01, 2019 12:43 pm

Is there a widget we could use in both the admin area and main site to show the total number of articles? For the main site, integrating it in to the archive and categories widgets would be great showing the number of articles in each section



User avatar
FlatPress Coder
Posts: 443
Joined: Sat Jan 26, 2019 7:40 pm

Re: Count total number of articles?

Post by Arvid » Sun Oct 27, 2019 11:45 am

I'm not aware of such a plugin existing - even though it shouldn't be too hard to create. A little coding fun, anyone? :)
Helpful FlatPress links: Project blog 📝 - FlatPress wiki 📖 - FlatPress@Twitter 🐦 - FlatPress@Mastodon 🐘
Stay up to date with our feeds: Forum RSS feed 📜 - Project blog RSS feed 📜
Feel free to say Thank you: Donate ❤️

🔥 How to rework your themes and plugins for FlatPress 1.3 / Smarty 4 🔥

🇩🇪 Für meinen Arbeitgeber in Bochum habe ich eine Stelle zu besetzen: Junior-Systemadministrator 🇩🇪

Posts: 46
Joined: Tue Mar 22, 2022 9:20 pm
Location: Berlin, Germany

Re: Count total number of articles?

Post by bttr » Tue Apr 19, 2022 7:45 pm

A quite old post, but let me still add something.
  1. I created a similar plugin today as an exercise to better understand how FlatPress works.
  2. The plugin adds as 'Count Entries' to the 'Entries' menu in the admin area.
  3. I didn't make it a widget for visitors, because it iterates through all blog entries every time. This will probably slow down larger FlatPress instances. (I didn't test this.)
  4. In fp-plugins/categories/plugin.categories.php you could change the setting $smarty->assign('categories_showcount', false); to true. But see above!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests