WPAchievements Shortcodes

On this page you will get an overview of available shortcodes.

WPAchievements Shortcode Generator

WPAchievements comes with a Shortcode Generator which will generate shortcodes with desired parameters for you. On your post or page edit page klick at “WPAchievements” to open the Shortcode Generator.

Then you can select desired shortcode, adjust parameters and click “Insert Shortcode” button.

Available Shortcodes

Additionally to our Shortcode Generator you can add shortcodes manually, too. Here ist a list of available shortcodes and their parameters.

My Achievements

Copy this to any post/page to display a list of achievement images that the user has gained. [wpa_myachievements]

Available Parameters

Parameter Description
user_id The ID of the user to list achievement images for. If blank it defaults to current logged in user.
show_title Whether to display the title: “My Achievements”. Example: “True” to show or “False” to hide. If blank it defaults to true.
title_class This class will be added to the title and will allow the use of custom CSS.
image_holder_class This class will be added to the achievement image holder and will allow the use of custom CSS.
image_class This class will be added to the achievement images in the list and will allow the use of custom CSS.
image_width This is the width of each achievement image. Value needs to be in “px”. Default is “30”
achievement_limit Limit the number of achievement images shown. If blank it will show all achievements available.

Examples

[wpa_myachievements user_id="1" show_title="true" achievement_limit="30"]
[wpa_myachievements user_id="2" show_title="false" image_width="20" achievement_limit="10"]

Achievements by Rank

Copy this to any post/page to display a list of achievement available for the choosen rank. [wpa_rank_achievements]

Available Parameters

Parameter Description
user_id The ID of the user to get the rank to list achievement images for. If blank “rank” parameter will be used.
rank The rank to list achievement images for. If blank achievements will not be shown.
show_title Whether to display the title: “My Achievements”. Example: “True” to show or “False” to hide. If blank it defaults to true.
title_class This class will be added to the title and will allow the use of custom CSS.
image_holder_class This class will be added to the achievement image holder and will allow the use of custom CSS.
image_class This class will be added to the achievement images in the list and will allow the use of custom CSS.
image_width This is the width of each achievement image. Value needs to be in “px”. Default is “30”
achievement_limit Limit the number of achievement images shown. If blank it will show all achievements available.

Examples

[wpa_rank_achievements rank="Newbie" show_title="true" achievement_limit="30"]
[wpa_rank_achievements user_id="1" show_title="false" image_width="20" achievement_limit="10"]

My Quests

Copy this to any post/page to display a list of quest images that the user has gained. [wpa_myquests]

Available Parameters

Parameter Description
user_id The ID of the user to list quest images for. If blank it defaults to current logged in user.
show_title Whether to display the title: “My Quests”. Example: “True” to show or “False” to hide. If blank it defaults to true.
title_class This class will be added to the title and will allow the use of custom CSS.
image_holder_class This class will be added to the quest image holder and will allow the use of custom CSS.
image_class This class will be added to the quest images in the list and will allow the use of custom CSS.
image_width This is the width of each quest image. Value needs to be in “px”. Default is “30”
quest_limit Limit the number of quest images shown. If blank it will show all quests available.

Examples

[wpa_myquests user_id="1" show_title="false" image_width="30" quest_limit="30"]
[wpa_myquests user_id="2" show_title="true" image_class="custom_image_class" quest_limit="10"]

My Rank

Copy this to any post/page to display the current rank information of the user. [wpa_myranks]

Available Parameters

Parameter Description
user_id The ID of the user to get the rank for. If blank it defaults to current logged in user.
rank_image Whether to show the rank image, if one is available. “True” to show or “False” to hide. If blank it defaults to true.
show_title Whether to display the title: “My Rank”. Example: “True” to show or “False” to hide. If blank it defaults to true.
title_class This class will be added to the title and will allow the use of custom CSS.

Examples

[wpa_myranks user_id="1" show_title="false" rank_image="true"]
[wpa_myranks user_id="2" show_title="true" rank_image="false" title_class="custom_title_class"]

Interactive Quest Steps

Copy this to any post/page to display the quest progress for a logged in user. This will show the user which steps he needs to fulfill in order to complete the quest. [wpa_quest_steps]

Available Parameters

Parameter Description
quest_id The ID of the quest. This parameter can’t be empty.
show_title Whether to display the title: “My Quests”. Example: “True” to show or “False” to hide. If blank it defaults to true.
title_class This class will be added to the title and will allow the use of custom CSS.
limit_rank Limit visibility of the quest progress to user rank. Example: “True” to limit or “False” for no limitation. If blank it defaults to false.

Examples

[wpa_quest_steps quest_id="1" show_title="false" limit_rank="false"]
[wpa_myquests quest_id="2"]

Unformatted Leaderboard List

Copy this to any post/page to display an unformatted leaderboard list. [wpa_leaderboard_list]

Available Parameters

Parameter Description
user_position Whether to show the trophy icons/place numbering. Example: “True” to show or “False” to hide. If blank it defaults to true.
user_ranking Whether to show the users rank information. Example: “True” to show or “False” to hide. If blank it defaults to true.
type Whether to order the leaderboard by amount of points or achievements. Example: “Points” or “Achievements”. If blank it defaults to Achievements.
limit Limit the number of users shown. If blank it will show all users available.
list_class This class will be added to the leaderboard list and will allow the use of custom CSS.

Examples

[wpa_leaderboard_list user_position="true" user_ranking="false" type="points" limit="10"]
[wpa_leaderboard_list user_position="false" user_ranking="true" type="achievements" limit="10"]

Custom Achievement Trigger

Copy this to any post/page to trigger a custom achievement. [wpa_custom_achievement]

Available Parameters

Parameter Description
trigger_id This is the unique “Trigger ID” that is used when creating the custom achievement in the “Achievements” area.
type Whether to produce a button or trigger the achievement when the post/page loads. Example: “Button” or “Instant”. If blank it defaults to Button.
text If the type “Button” is choosen then this text is displayed within the button.

Examples

[wpa_custom_achievement trigger_id="unique_trigger_id" type="button" text="Click for Achievement"]
[wpa_custom_achievement trigger_id="unique_trigger_id" type="instant"]

Standard Leaderboard

Copy this to any post/page to display a standard leaderboard. [wpa_leaderboard_widget]

Available Parameters

Parameter Description
type Whether to order the leaderboard by amount of points or achievements. Example: “Points” or “Achievements”. If blank it defaults to Achievements.
limit Limit the number of users shown. If blank it will show all users available.

Examples

[wpa_leaderboard_widget type="points" limit="10"]
[wpa_leaderboard_widget type="achievements" limit="10"]

Leaderboard Data Table

Copy this to any post/page to display an advanced leaderboard data table. [wpa_leaderboard]

Available Parameters

Parameter Description
position_numbers Whether to show leaderboard position numbering. Example: “True” to show or “False” to hide. If blank it defaults to true.
columns Select which columns to display. Available Inputs: avatar,points,rank,achievements,quests. If blank it defaults to true.
limit Limit the number of users shown. If blank it will show all users available.
achievement_limit Limit the number of achievements shown. If blank it will show all achievements available.
quest_limit Limit the number of quests shown. If blank it will show all quests available.
list_class This class will be added to the leaderboard list and will allow the use of custom CSS.

Examples

[wpa_leaderboard position_numbers="true" achievement_limit="10" quest_limit="10" limit="10" columns="avatar,points,rank,achievements,quests"]
[wpa_leaderboard position_numbers="false" limit="10" list_class="my_custom_class" columns="avatar,points,achievements"]

Our Achievements

Copy this to any post/page to display all available achievements. [wpa_achievements]

Examples

[wpa_achievements]

Our Quests

Copy this to any post/page to display all available quests. [wpa_quests]

Examples

[wpa_quests]

Single Achievement / Quest

Show a certain achievement by ID on any page or post. [wpa_achievement] and [wpa_quest]

Available Parameters

Parameter Description
post_id The Post ID of an achievement or quest.
show_title Set “true” in order to display the title of an achievement or quest.
show_description Whether to display the achievement/quest description (post content). If blank it defaults to true.
show_image Whether to display the achievement/quest badge. If blank it defaults to true.
show_trigger Whether to display the achievement trigger or required quest steps. If blank it defaults to true.
trigger_title Set the title for required steps to gain this achievement or quest.

Examples

Reaplce the post id with your correct post ID for an achievement or quest.

[wpa_achievement post_id="123" show_title="true" show_description="true" show_image="true" show_trigger="true" trigger_title="How to gain this achievement?"]
[wpa_quest post_id="456" show_title="true" show_description="true" show_image="true" show_trigger="true" trigger_title="How to solve this quest?"]

Conditional Shortcodes

The conditional shortcodes allow you to display content or content parts dependent of gaines achievements, solved quests or user rank. [wpa_if_achievement] or [wpa_if_quest] or [wpa_if_rank]

Available Parameters

Parameter Description
post_id The Post ID of an achievement or quest. (Not applicable for wpa_if_rank shortcode)
rank The minimal rank required to view the content. (Only for wpa_if_rank.)
condition Wheater the exact rank is required or minimual rank. Values: equal or minimal. (Only for wpa_if_rank.)

Examples

Display content only if user has gained an achievement. Otherwise display the alternative content:

[wpa_if_achievement post_id="123"]
Display this if user has gained the achievement.
[wpa_else_achivement]
Otherwise display this content.
[/wpa_if_achievement]

Display content only if user has gaisolved a quest. Otherwise display the alternative content:

[wpa_if_quest post_id="123"]
Display this if user has gained the achievement.
[wpa_else_quest]
Otherwise display this content.
[/wpa_if_quest]

Display content only if user has a rank. Otherwise display the alternative content:

[wpa_if_rank rank="Expert" condition="equal"]
Display this if user has the rank Expert.
[wpa_else_rank]
Otherwise display this content.
[/wpa_if_rank]