Skip to main content

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​

AttributeDefaultDescription
level1Minimum access level required (1-10)
messageFrom settingsCustom 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​

AttributeDefaultDescription
titleFrom settingsSection heading
subtitleFrom settingsDescription text
show_toggletrueShow monthly/yearly toggle
show_headertrueShow title and subtitle
default_cyclemonthlyDefault 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​

AttributeDefaultDescription
textSign InButton text for guests
class""Additional CSS classes
show_avatartrueShow 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​

AttributeDefaultDescription
zonesidebarAd zone identifier

Available Zones​

ZoneTypical PlacementShortcode
headerTop of page, below navigationYes
sidebarIn widget areasYes
in_contentWithin post bodyAuto-inserted
after_contentAfter post contentAuto-inserted
footerBottom of pageYes
note

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​

TemplatePurpose
Paywall Login/RegisterLogin and registration page
Paywall AccountMember dashboard with subscription management
Paywall PricingDisplays pricing table (can also use shortcode)

How to Use​

  1. Create a new page in WordPress
  2. In the Page Attributes panel, select the template
  3. Publish the page

The template automatically displays the appropriate content without needing shortcodes.

tip

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]
warning

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