Shortcodes

Poptrends uses shortcodes to make things in the plugin work. For customization, this can be used manually. Here's how to use them.

[poptrends_rate]

Shows the star rating buttons. This is a standalone shortcode that does not require arguments.

[poptrends]

Shows a list of rated and loved posts made within a specified date range.

Parameters:
type = The post ID. If left unspecified, it reads the current post ID being displayed or rendered in the loop or single pages. It is possible to forcibly specify a value of another post ID.
post_type = Specify the string slug of the post type to use. Leave blank to look across all public post types.
range = A string value that specifies how far back to look for ratings detail. Values to choose from are: all, daily, weekly, monthly, yearly.
num = A number value that dictates how many posts with ratings to pull.
style = An optional parameter that sets the class attribute of the heart shortcode, that is readable by the global Document Object Model.

This shortcode can be used without any parameters.

[poptrends_heart]

Shows the heart clicker wherein clicking it will increment the value of hearts a post has.

Parameters:
ID = The post ID. If left unspecified, it reads the current post ID being displayed or rendered in the loop or single pages. It is possible to forcibly specify a value of another post ID.
count = Boolean value. Show how much hearts a post has received. Default value is set to 'true' 

This shortcode can be used without any parameters.

[poptrends_widget]

The shortcode version of the tabbed widget used in PopTrends.

Parameters:

theme = The visual theme of the shortcode. If left unspecified, it defaults to plain. Choose from twenty-fourteen, flat, lined, and plain. Plain is easily styleable and can be customized to match your current theme.
tab_labels = Specify how the tab labels are rendered. Choose from text (default) or icon.
show_review_link = Show a link to a list of reviews. Default value is set to 'true'
num =
thumbnails =
popular =

If Reviews is enabled and Ratings is disabled, or the post ID does not belong to any of the checked post types and/or taxonomies, this shortcode will not output anything.