Welcome to our Knowledge Base
Categories
< All Topics
Print

Peer Pressure

The Peer Pressure shortcode provides a motivational way to encourage student engagement. By showing a learner how many others have completed a lesson or course, it creates a sense of community and gentle competition. This feature is flexible and can be customized to display different messages depending on progress.

To use Peer Pressure, add the following shortcode to a post or page:

[wpc_peer_pressure zero="Be the first to complete this!" single="1 person has already completed this!" plural="{number} people have already completed this!" completed="Yay! You did it!"]

Shortcode Parameters

The [wpc_peer_pressure] shortcode supports the following attributes for customizing messages:

  • zero (string)
    Message shown when no users have completed the post.
    Default: "Be the first to complete this!"
  • single (string)
    Message shown when one user has completed the post.
    Default: "1 person has already completed this!"
  • plural (string)
    Message shown when two or more users have completed the post. Supports dynamic values such as {number}.
    Default: "{number} people have already completed this!"
  • completed (string)
    Message shown when the logged-in user has completed the post. Supports dynamic values.
    Default: "Yay! You did it!"

Available Dynamic Variables

Dynamic placeholders can be used in the plural and completed attributes to add more personalized information:

  • {next_with_ordinal} – Displays the next completion position in ordinal format (e.g., “5th”)
  • {number} – Total number of users who completed the post
  • {percentage} – Percentage of users who completed the post

Conclusion

The Peer Pressure shortcode in WPComplete adds a social element to online learning by showing students how they compare to others. With customizable messages and dynamic variables, instructors can create motivating prompts that increase engagement and encourage course completion.

Table of Contents