Shortcodes Reference
WPComplete shortcodes provide flexible ways to add progress-tracking buttons, show conditional content, and display course or lesson progress. This guide outlines the available shortcodes in both the Free and Pro versions of WPComplete, with examples of how each can be used on a WordPress site.
Free Version Shortcode
The free version of WPComplete supports a single shortcode: [wpc_button]
This will add a “Complete Lesson” button. You can either:
- Automatically add a button to the bottom of the post type you select, or
- Manually insert the button using the shortcode.
Pro Version Shortcodes (Full list here)
With WPComplete Pro, additional shortcodes are available to provide advanced functionality and customization.
Button Shortcodes
- Add multiple buttons to a page using a name:
[wpc_button name="button-one"] - Show a button from another lesson by referencing its post ID:
[wpc_button post="345"] - Customize button text for a specific instance (you can also set global text in the settings page):
[wpc_button text="Click me to complete!" completed_text="YAY! Completed"]
Conditional Content
Show content only if a button is completed: [wpc_button text="Click me to complete!" completed_text="YAY! Completed"]
Show content only if a button is incomplete: [wpc_incomplete_content]Content for incomplete[/wpc_incomplete_content]
Make conditions button-specific: [wpc_incomplete_content]Content for incomplete[/wpc_incomplete_content]
Make conditions post-specific (using post ID): [wpc_completed_content post="435"]Combining post and button specific shorcodes: [wpc_incomplete_content name="button-one" post="435"]Conditional content[/wpc_incomplete_content]
Page Level Conditions (when all buttons on a page are completed or incomplete):
- Completed:
[wpc_if_page_completed]This page is completed![/wpc_if_page_completed] - Incomplete:
[wpc_if_page_incomplete]This page is not completed![/wpc_if_page_incomplete] - Reference another page by ID:
[wpc_if_page_completed page="123"]Completed page content[/wpc_if_page_completed]
Course-level conditions:
[wpc_completed_content course="Course Name"]Completed course content[/wpc_completed_content][wpc_incomplete_content course="Course Name"]Incomplete course content[/wpc_incomplete_content]
For the current course:
[wpc_if_course_completed]This course is completed![/wpc_if_course_completed][wpc_if_course_incomplete]This course is not completed![/wpc_if_course_incomplete]
Progress Tracking
WPComplete PRO offers several ways to display student progress.
Text-only options:
[wpc_progress_percentage] <!-- Shows percentage completed -->[wpc_progress_percentage course="Course-Name"] <!-- Specific course -->[wpc_progress_in_ratio] <!-- e.g., 3/10 lessons -->[wpc_progress_in_ratio course="Course-Name"] <!-- Specific course -->
Visual options (customizable in settings):
Progress Bar:
[wpc_progress_bar][wpc_progress_bar course="Course-Name"]
Progress Circle Graph:
[wpc_progress_graph][wpc_progress_graph course="Course-Name"]
Listing Your Lessons
Do you want to list all the content (pages, posts, or conditional content) that are completable lessons? You can use this shortcode, and add refinements to it like orderby, order, and/or only show complete or incomplete lessons:
[wpc_list_pages orderby="menu_order" order="DESC" show="incomplete"]
Conclusion
Whether using WPComplete Free or Pro, these shortcodes offer flexible ways to control how learners interact with and track their progress through your content. From adding completion buttons to conditionally showing content and tracking progress, these tools are designed to enhance any course experience.
Thanks for using WPComplete!