Top 10 Pro registers two Popular Authors shortcodes: one lists your most popular authors and one lists the most popular posts of a single author. They require Popular Authors to be enabled under Top 10 Settings – Features. When it is disabled, the shortcodes output nothing instead of showing raw shortcode text.

The wzpa_ shortcodes from the retired Popular Authors plugin still work. [wzpa_popular_authors] accepts the same attributes as [tptn_popular_authors], and [wzpa_author_top_posts] accepts the same attributes as [tptn_author_top_posts].

Displays your authors ranked by the total views of their posts.

[tptn_popular_authors number="5" optioncount="1" show_avatar="1"]

All attributes are optional. Attributes you omit use the values under Top 10 Settings – Popular Authors. For boolean attributes, use 1 or 0. Any non-empty value other than 0, including false, turns the option on, except for daily.

ParameterTypeDescription
numberIntegerMaximum number of authors. -1 displays all authors. Default 10.
offsetIntegerNumber of authors to skip from the top of the list. Default 0.
pagedIntegerPage of results to display when offset is 0. Default 1.
dailyBooleanRank by views in a recent period instead of all-time views. Accepts 1, true, yes, or on. Default false.
daily_rangeIntegerDays in the period when daily is on. Default 1.
hour_rangeIntegerHours added to the day range. Default 0.
optioncountBooleanDisplay the author’s total views. Default 0.
show_postcountBooleanDisplay the author’s number of published posts. Default 0.
show_fullnameBooleanDisplay the first and last name instead of the display name. Default 0.
show_avatarBooleanDisplay the author’s avatar. Default 0.
exclude_adminBooleanRemove the user with the login admin. Default 0.
hide_emptyBooleanSkip authors with no published posts. Default 1.
includeStringComma-separated author IDs. When set, only these authors are listed and exclude is ignored.
excludeStringComma-separated author IDs to remove.
post_typeStringComma-separated post types whose views count toward the total. Default post.
stylesStringAdds the CSS class for a style: card or left_thumbs. The stylesheet itself loads only for the style selected in the settings.
cacheBooleanCache the output. Default 1.
before_listStringHTML before the list. Default <ul>.
after_listStringHTML after the list. Default </ul>.
before_list_itemStringHTML before each author. Default <li>.
after_list_itemStringHTML after each author. Default </li>.

To display the top authors of the last seven days with their post counts:

[tptn_popular_authors daily="1" daily_range="7" show_postcount="1"]

[tptn_author_top_posts]

Displays the most popular posts of one author.

[tptn_author_top_posts author="42" posts_per_page="5"]

The author attribute is required. Without it, the shortcode outputs nothing.

ParameterTypeDescription
authorInteger / StringThe author to look up, matched against field.
fieldStringWhat author contains: id, slug (the user nicename), email, or login. Default id.
posts_per_pageIntegerNumber of posts. Default 10.
post_typeStringComma-separated post types. Default post.
orderbyStringvisits, date, or title. Default visits.
orderStringDESC or ASC. Default DESC.
dailyBooleanRank by views in a recent period instead of all-time views. The period comes from Default day range and Default hour range in the settings. Default false.
disp_list_countBooleanDisplay the view count after each post title. Default 1.

To display an author’s top posts by username:

[tptn_author_top_posts author="jane" field="login" posts_per_page="3"]

See also

Was this article helpful?