Skip to content
Discussion options

You must be logged in to vote

Hey,

I built a small plugin that adds shortcodes for displaying content counts on your Publii site - posts, pages, tags, authors.

What it does

Drop a shortcode like [pcc=posts] anywhere - in a post, a page, or directly in your theme's .hbs templates - and it gets replaced with the actual number during rendering.

Basic shortcodes:

  • [pcc=posts] - number of published posts
  • [pcc=pages] - number of published pages
  • [pcc=total] - combined total (posts + pages)
  • [pcc=featured] - number of featured posts

Tag & author shortcodes:

You can also count posts per tag or author. Use either the slug or the ID:

  • [pcc=tag name=tutorials] - number of posts in a tag (by slug)
  • [pcc=tag id=5] - same, but by tag ID

Replies: 5 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Backspaze
Comment options

@candidexmedia
Comment options

Comment options

You must be logged in to vote
4 replies
@gpsblues
Comment options

@candidexmedia
Comment options

@gpsblues
Comment options

@Backspaze
Comment options

Comment options

You must be logged in to vote
1 reply
@Backspaze
Comment options

Comment options

You must be logged in to vote
6 replies
@bobmitro
Comment options

@Backspaze
Comment options

@bobmitro
Comment options

@Backspaze
Comment options

@Backspaze
Comment options

Answer selected by Backspaze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants