Shortcodes Reference
PaywallWP Pro provides several shortcodes for displaying content and functionality throughout your site.
Content Protection
[paywp_protected]
Protect specific content within a post or page.
[paywp_protected level="1"]
Premium content goes here...
[/paywp_protected]
Attributes
| Attribute | Default | Description |
|---|---|---|
level | 1 | Minimum access level required (1-10) |
message | From settings | Custom message for non-members |
Examples
Basic protection:
[paywp_protected]
This content requires a subscription.
[/paywp_protected]
Level 3 protection:
[paywp_protected level="3"]
Premium exclusive content for Level 3+ subscribers.
[/paywp_protected]
Custom message:
[paywp_protected level="2" message="Upgrade to Premium to unlock this section"]
Premium content here...
[/paywp_protected]
Behavior
- Non-members: See the protection message and subscribe CTA
- Members below level: See the protection message
- Members at/above level: See the content
[paywp_member]
Show content only to members with any active subscription. No message shown to non-members.
[paywp_member]
Member-only content here...
[/paywp_member]
Behavior
- Non-members: See nothing (completely hidden)
- Members: See the content
Use Cases
- Member-exclusive links
- Special announcements
- Hidden bonuses
- Personalized content
Example
[paywp_member]
🎉 Thank you for being a member! Here's a special discount code: MEMBER20
[/paywp_member]
Page Shortcodes
[paywp_pricing]
Display the pricing table with all active subscription plans.
[paywp_pricing]
Attributes
| Attribute | Default | Description |
|---|---|---|
title | From settings | Section heading |
subtitle | From settings | Description text |
show_toggle | true | Show monthly/yearly toggle |
show_header | true | Show title and subtitle |
default_cycle | monthly | Default billing cycle |
Examples
Default:
[paywp_pricing]
Custom title:
[paywp_pricing title="Choose Your Plan" subtitle="Cancel anytime, no questions asked"]
Yearly default:
[paywp_pricing default_cycle="yearly" show_toggle="true"]
Minimal (embed in existing page):
[paywp_pricing show_header="false"]
Profile Widget
[paywp_profile]
Display a login button for guests or user dropdown for members.
[paywp_profile]
Attributes
| Attribute | Default | Description |
|---|---|---|
text | Sign In | Button text for guests |
class | "" | Additional CSS classes |
show_avatar | true | Show user avatar when logged in |
Examples
Default:
[paywp_profile]
Custom text:
[paywp_profile text="Log In"]
With custom class:
[paywp_profile text="Member Login" class="my-custom-btn"]
Behavior
- Guests: Shows login button
- Members: Shows avatar dropdown with:
- Account link
- Profile link
- Logout link
Ad Zone
[paywp_ad]
Display advertisements from a specific ad zone.
[paywp_ad zone="sidebar"]
Attributes
| Attribute | Default | Description |
|---|---|---|
zone | sidebar | Ad zone identifier |
Available Zones
| Zone | Typical Placement | Shortcode |
|---|---|---|
header | Top of page, below navigation | Yes |
sidebar | In widget areas | Yes |
in_content | Within post body | Auto-inserted |
after_content | After post content | Auto-inserted |
footer | Bottom of page | Yes |
in_content and after_content zones are inserted automatically into posts and don't require shortcodes. The auto zone is for auto-ads scripts and is inserted in the page head.
Examples
Header ad:
[paywp_ad zone="header"]
Sidebar ad in widget:
[paywp_ad zone="sidebar"]
Footer ad:
[paywp_ad zone="footer"]
Behavior
- Non-subscribers: Ad is displayed
- Subscribers with ad-free: Ad is hidden
- Empty zone: Nothing displayed
Page Templates
PaywallWP Pro provides page templates for key pages. These are not shortcodes — they are WordPress page templates.
Available Templates
| Template | Purpose |
|---|---|
| Paywall Login/Register | Login and registration page |
| Paywall Account | Member dashboard with subscription management |
| Paywall Pricing | Displays pricing table (can also use shortcode) |
How to Use
- Create a new page in WordPress
- In the Page Attributes panel, select the template
- Publish the page
The template automatically displays the appropriate content without needing shortcodes.
The plugin's Setup Wizard automatically creates these pages for you.
Using Shortcodes
In Post/Page Content
Simply add the shortcode in the WordPress editor:
Welcome to our site!
[paywp_pricing]
Sign up today!
In Widgets
Use a Shortcode widget or Custom HTML widget:
[paywp_profile]
In Theme Templates
Use do_shortcode():
<?php echo do_shortcode('[paywp_pricing]'); ?>
In Block Editor
Use the Shortcode block and paste the shortcode.
Nesting Shortcodes
You can nest certain shortcodes:
[paywp_protected level="2"]
Premium section content...
[paywp_member]
Extra bonus for any member!
[/paywp_member]
[/paywp_protected]
Don't nest the same shortcode within itself.
Common Use Cases
Teaser Content
Show a preview then protect the rest:
Here's what you'll learn in this guide...
[paywp_protected level="1"]
## The Full Guide
Complete content here...
[/paywp_protected]
Member Welcome
Welcome returning members:
[paywp_member]
Welcome back! Check out our latest exclusive articles.
[/paywp_member]
Pricing in Landing Page
Embed pricing in a custom landing page:
## Why Subscribe?
Benefits listed here...
[paywp_pricing show_header="false"]
## Still have questions?
FAQ here...
Header Profile Widget
Add to theme header:
<div class="site-header">
<!-- Logo and navigation -->
<div class="header-profile">
<?php echo do_shortcode('[paywp_profile]'); ?>
</div>
</div>
Troubleshooting
Shortcode Showing as Text
- Verify plugin is activated
- Check for typos in shortcode
- Ensure shortcode is not in a
<code>block
Content Not Protected
- Verify level is greater than 0
- Check user access level
- Test while logged out
Pricing Not Displaying
- Ensure plans are published
- Verify plans have prices
- Clear cache
Profile Widget Not Working
- Check JavaScript console for errors
- Verify login page is configured
- Test with default theme