外掛標籤
開發者團隊
原文外掛簡介
You’ve put years into your site. Tivy Site Stats turns all that effort into numbers your visitors will notice: “Words: 359,226” fades into “Photos: 14,232” fades into “Years blogging: 17”.
Statistics
Words: across all your published posts, counted properly (no HTML, block markup or shortcodes), with accented characters handled correctly
Posts, photos, videos and approved comments
Years blogging and Blogging since, worked out from your first post
Reading time: how long it would take to read everything you’ve written (“26 hours”, “3.5 days”)
Terms in any taxonomy, such as categories, tags or your own (Countries visited: 47, Recipes: 212, Books reviewed: 96)
Four ways to show them
Rotating ticker: one figure at a time, fading smoothly. Made for headers and menu bars.
Inline list: everything on one line: Words: 359,226 | Posts: 639 | Photos: 14,232
Grid: big-number cards that count up from zero when scrolled into view. A ready-made stats page.
Single figure: one number inside a sentence: “I’ve written [tivy_stat type=”words”] words so far.”
Yearly archive
Your posts by year or month, with counts, as a block or the [tivy_archive] shortcode:
Row of links: 2026 (85) • 2025 (91) • 2024 (54)
Headings: each year (or month) linked to its archive page, optionally listing its posts
Expandable sections: click a year to open it; months can open inside it
Featured images as a tidy grid of cards, dates, a “View all” link after the first few posts, a row of year links at the top, oldest or newest first
Only certain categories or tags, or leave some out
Counts and post lists are cached and refreshed whenever you publish, edit or delete a post, so even a big archive is a light page
Built to be fast and friendly
Figures are cached and refreshed in the background when you publish, edit, delete, upload or approve a comment, so visitors never wait for a recount
Use it with shortcodes, the Site Stats block or PHP template tags
Font size, label size, label style, labels, link, rotation speed, number format (359,226 or 359K), columns and reading speed are all configurable, globally or per use
Choose which post types count
Accessible: screen readers get the full text, the ticker pauses on hover and focus, and visitors who prefer reduced motion see a static list
No jQuery, no external requests, no tracking, no cookies
Usage
Statistic keys
words, `posts`, `photos`, `videos`, `comments`, `years`, `since`, `reading`, and `terms:{taxonomy}` (e.g. `terms:category`, `terms:post_tag`).
Ticker, inline list or grid
[tivy_site_stats]
[tivy_site_stats mode="inline"]
[tivy_site_stats mode="grid" columns="4" items="years,words,reading,photos"]
Attributes (all optional, defaults come from Settings → Site Stats):
items: comma list of keys, in the order you want them
mode: ticker (default), inline or grid
link: URL to link to, or none (ticker and inline)
interval: seconds per item (ticker)
columns: 1–6 (grid; automatic if omitted)
countup: no to turn off the grid’s count-up animation
font_size: e.g. 16px, 1rem
label_size: e.g. 0.75em, 1em
label_case: uppercase or none
label_position: before, after, above or below
format: full or short
label: yes or no
separator: separator for inline mode
color: hex colour, e.g. #ffffff
class: extra CSS classes
Single figure
[tivy_stat type="words"]
[tivy_stat type="terms" taxonomy="country" label="yes"]
type: any key above, or terms with taxonomy
format: full, short or raw (raw = bare number, no markup)
label: yes to include the label (default no)
label_position: before, after, above or below
countup: yes to animate
plus link, font_size, label_size, color, class
Yearly archive
[tivy_archive]
[tivy_archive layout="inline"]
[tivy_archive layout="expand" thumbnails="yes" jump="yes"]
[tivy_archive group="month" posts="yes" limit="5"]
layout: list (headings, default), expand (expandable sections) or inline (one row of links)
group: year (default) or month
count: no to hide post counts
posts: yes to list the posts (default yes for expand, no otherwise)
limit: posts shown per year or month, followed by a “View all” link (0 = all)
thumbnails: yes for featured images; thumb_size (default thumbnail) and columns
date: no to hide post dates; date_format, e.g. j M
jump: yes for a row of year links at the top
open: first (default), all or none (expand)
order: desc (newest first, default) or asc
max_years: show only the latest so many years
heading: h2–h6 (default h3)
link: no to stop years and months linking to their archive pages
post_type: comma list (default: the post types counted in Settings)
category, tag, exclude_category: slugs or IDs, comma separated
separator: between links in a row (default •)
class: extra CSS classes
Template tags
'inline' ) ); ?>
