$100 Website Offer

Get your personal website + domain for just $100.

Limited Time Offer!

Claim Your Website Now

How to Show the Total Article Count Publicly in Drupal

Drupal

Drupal is a powerful content management system, but sometimes even simple requirements—like showing the total number of published articles—aren’t obvious to implement. This guide will walk you step-by-step through enabling a public article counter using only Drupal’s built-in Views module, so anyone can see how many articles you’ve published.


Why Would You Want This?

  • Showcase the size of your content library.
  • Provide transparency for readers or customers.
  • Create engagement: “Join 150 other contributors!”
  • API: Make the count accessible to outside tools.

Prerequisites

  • A Drupal 8, 9, or 10 website.
  • Admin (or Views editing) permissions.

If you want to know How to Download, Install, and Run Drupal then click on this. It has complete step by step guide.

Step 1: Create a View for Article Counting

  1. Go to ManageStructureViews.

2. Click Add view.

Configure the View:

  • View name: Article Counter
  • Show: Content of type Article
  • Create a page: ✔️ (checked)
  • Page title: Article Counter
  • Path: /article-count (or any path you prefer)
  • Display format: Unformatted list (default is fine)
  • Click Save and edit.

Step 2: Add a Dummy Field (Hidden Field Requirement)

Drupal Views requires at least one field, even if you only want to show a summary. Here’s how:

In the View editor, under Fields, click Add.

Search for Nid or Title (e.g., Content: Nid).

  1. Add the field.
  2. In the field’s settings, check “Exclude from display” (so it won’t show on the page).
  3. Click Apply.

Step 3: Add the Result Summary in the Header

  1. Find the Header section (right column in Views editor).
  2. Click Add beside Header.
  1. In the search box, type Result summary.
  2. Select Global: Result summary and Add and configure.
  1. In “Text to display”, enter:
  2. Total Published Articles: @total
    • @total will automatically display the actual count.
  3. Save the configuration.

Step 4: (Optional) Hide the Article List

If you want to show only the count and not a list of articles:

  1. In the Pager section (bottom center), set Items to display to 0.
    • This will suppress the list and show just the summary.

Step 5: Save and Test

  • Click Save at the top of the View editor.
  • Visit your new page (e.g., /article-count).
  • You should see something like: Total Published Articles: 13

Step 6: Make Sure It’s Public

  • The View is public as long as you haven’t restricted access.
  • Ensure anonymous users can “View published content” in People → Permissions.

Conclusion

With these steps, you can quickly and easily add a public article counter to your Drupal website—no code, no extra modules, and it updates automatically as your content grows!

Show off your Drupal content today!

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x