[affiliate_content] shortcode

The [affiliate_content] shortcode allows you to restrict content on a page or post so that only logged-in affiliates can see it. This is useful when you want to provide exclusive banners, promotional materials, links, or other assets that should only be accessible to registered affiliates.

Using the [affiliate_content] Shortcode

To restrict content to affiliates, simply wrap the desired content within the shortcode, like this:

[affiliate_content]This content is only visible to logged-in affiliates.[/affiliate_content]

When a logged-in affiliate views the page, they will see the message or content inside the shortcode. If a non-affiliate or a logged-out user views the page, the content inside the shortcode will not be visible.

Example Use Case

If you want to display marketing materials only to logged-in affiliates, use:

[affiliate_content]
Here are your exclusive banners and referral links!
<img src="https://yourwebsite.com/banner.jpg" alt="Affiliate Banner">
[/affiliate_content]

Only approved affiliates will be able to see and download these assets.


That’s it! The [affiliate_content] shortcode is a simple yet powerful way to control access to affiliate-exclusive content. Whether you’re sharing marketing materials, referral links, bonuses, or private announcements, this shortcode ensures that only approved affiliates have access.

Start Getting More Sales Today with AffiliateWP

Launch your affiliate program today and unlock a new revenue channel to grow your business faster.