• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

HANDS ON WORDPRESS

Making a Living with WordPress

  • Home
  • Blog
  • About
    • About Hands On WordPress
  • The Austin WordPress Community
  • Contact
  • Show Search
Hide Search
You are here: Home / WordPress / Shortcode: How to Show Blog Statistics

Shortcode: How to Show Blog Statistics

Nick Batik · November 15, 2012 · Leave a Comment

WordPress Short Code Tips and Tricks

A lot of blogs love to show off how many posts have been authored under their name, or how many comments, or some other statistic.

This WP Code Snippets shortcode function allows an author to call a range of interesting statistics by adding the shortcode into their post or page. Plus, it can be used in conjunction with the previous shortcode that hides content to all but admins, to show information like number of pending comments or those in the spam queue.

Usage

Yep, that’s a long one! However, it’s necessary to offer you the range of valuable information now available with a few lines of text, as shown below. The full list of types is avilable on the original blog post, and one is needed to be dropped into the “type” attribute. In the cases of statistics that reference a specific user, the “extra” attribute is needed and fufiled with the specific ID.

[gist id=4082312]

Filed Under: WordPress Tagged With: Best Practices, WordPress Code Snippets, WordPress Shortcodes

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About Sandi Batik

About Sandi Batik

Introverted Freelancer, WordPress trainer, consultant, curricula developer, author, unapologetic geek, unrepentant capitalist, lucky enough to do what I love … more about me about About Sandi Batik

  • Twitter

Search

Introverted Freelancer

Traits of Successful Introverted Freelancers

Traits of Successful Introverted Freelancers

2017 Business Check-up Workshop

2017 Business Check-up Workshop

Expanding Your Business With Automated Marketing Funnels

Expanding Your Business With Automated Marketing Funnels

How to Use Permission Marketing to Build Your WordPress Business

How to Use Permission Marketing to Build Your WordPress Business

How Much Should I Charge for Building or Designing a WordPress Website?

How Much Should I Charge for Building or Designing a WordPress Website?

Project Management

Keeping Scope Creep From Killing Your Schedule and Profit Margin

Keeping Scope Creep From Killing Your Schedule and Profit Margin

Project Management for WordPress Freelancers

Project Management for WordPress Freelancers

WordPress

Securing and Maintaining Your WordPress Site

Securing and Maintaining Your WordPress Site

How The WordPress Media Library Works — 2018

How The WordPress Media Library Works — 2018

How To Build an Information Structure for Your WordPress Site

How To Build an Information Structure for Your WordPress Site

How WordPress Themes Really Work

How WordPress Themes Really Work

How to Create and Manage eMail Newsletters from Your WordPress Site

How to Create and Manage eMail Newsletters from Your WordPress Site

How to Secure and Maintain Your WordPress Site

How to Secure and Maintain Your WordPress Site

Copyright © 2010-2023 Hands On WordPress · All Rights Reserved