View Categories

Shortcodes Tab

The Shortcodes tab in the Popup Box plugin allows you to display dynamic data inside your popups. Instead of writing static text, you can use ready-made shortcodes to automatically pull in information such as the logged-in user’s name, email address, or popup category details.

This is especially useful when you want to personalize your popups or reuse certain data without manually entering it every time. Beginners can think of shortcodes as “placeholders” that automatically get replaced with real values when the popup is displayed.


Why Shortcodes Are Useful #

  • Personalization – Greet users by their first name or display their email inside the popup.
  • Automation – No need to manually update popups; shortcodes fetch live data.
  • Dynamic Popups – Create different experiences for logged-in users vs. visitors.
  • Flexibility – Easily display popup categories, author names, or roles without coding.

To access the Shortcodes tab, go to your WordPress dashboard and navigate to:
Popup Box > General Settings > Shortcodes.

General Settings Shortcodes

Here, you’ll find a list of ready-made shortcodes that can be used inside your popups.

Available Shortcodes #

1. User Information #

User Information

These shortcodes automatically display data about the logged-in user.

  • User First Name[ays_pb_user_first_name]
  • User Last Name[ays_pb_user_last_name]
  • User Display Name[ays_pb_user_display_name]
  • User Nickname[ays_pb_user_nickname]
  • User Email[ays_pb_user_email]
  • Show Current Popup Author[ays_pb_current_author id="YOUR_PB_ID"]
  • Show User Roles[ays_pb_user_roles]

Example:
“Hello [ays_pb_user_first_name], welcome back!”
If the user’s first name is Monica the popup will display:
“Hello Monica”

Shortcode In Popup Description
Name Shortcode On Popup

2. Popup Categories #

Popup Categories

You can also display information related to popup categories.

  • Category Title[ays_pb_cat_title id="Your_PB_Category_ID"]
  • Category Description[ays_pb_cat_description id="Your_PB_Category_ID"]

Example:
If you have a category called Promotions, using [ays_pb_cat_title id="1"] will display:
“Promotions”

Category Shortcode In Popup Description
Category On Popup

How to Use Shortcodes #

  1. Navigate to Popup Box > General Settings > Shortcodes.
  2. Copy the shortcode you want to use and paste it inside your popup content (text editor, description, or message area).
  3. Paste it inside your popup content (text editor, description, or message area).
  4. Save your popup – the shortcode will display live data when shown to users.

Best Practices #

  • Always test your popup after inserting a shortcode to confirm it displays the expected value.
  • Combine shortcodes with marketing text to make your popups more engaging.
    Example:
    “Dear [ays_pb_user_first_name], here’s a special discount just for you!”
  • If a user is not logged in, some shortcodes (like first name or email) may remain blank. In such cases, consider using conditional messages or fallback text.

Conclusion #

The Shortcodes tab is a powerful tool that helps you create dynamic and personalized popups without coding. By inserting these small placeholders, you can show user information, popup categories, and much more.

Next, explore the Message Variables Tab to learn how to customize email subjects and messages with dynamic placeholders.

If you have questions about using shortcodes or run into issues, feel free to reach out to our Contact Form.

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *