
Page Guard uses a single URL parameter or POST variable as a means of providing a token to guard access to any page on which this plugin’s shortcode is placed. Output of alternative content can be made to occur when the token is missing or fails to match what is expected – if the token received matches the expected one, the controlled content can be revealed to the visitor.
For this version, an additional shortcode attribute “title” also allows the page title to be changed conditionally PROVIDED JAVASCRIPT IS ENABLED IN THE BROWSER (it has no effect if JavaScript is turned off!)
The shortcode to use is ‘pageguard’ – its attributes are:
tokenparam (required) -> a string value containing the name of the token URL param - e.g. 'mytoken' eq (optional) -> a string value containing the expected value of the tokenparam - e.g. 'x34ggj45b' ne (optional) -> as for "eq" but when used, shortcode will output content on non matching token absent (optional) -> when absent="1", shortcode will output content on detection of missing token title (optional) -> a string containing a page title to apply when the parent shortcode's criteria are met
Syntax examples:
show block on matching token - [pageguard param="token" eq="download"] Text to be output on matching token found [/pageguard] show block on non match + change title [pageguard tokenparam="token" ne="download" title="Downloads - invalid token"] Error text for output when token fails to match [/pageguard] show this on no token found + change title [pageguard tokenparam="token" absent="1" title="Downloads - missing token"] Error text for output when token is missing [/pageguard]
A typical use scenario might be to control access to a downloads page. Suppose you have a PayPal “Buy Now” button on your site which allows visitors to make a payment for say, an eBook or audio recording. When setting up the button in your PayPal account you specify a URL on your site to which the visitor is returned after they’ve made payment. On this return page you’ve added a link the visitor can use to download their purchase – however, you don’t want any non paying visitors to have access to the download link(s) on the page! If you also want the page title to reflect any error conditions, you an use the “title” attribute to do this (please be aware however that this functionality depends on JavaScript being enable in the user’s browser – it disabled, “title” has no effect.)
Add a parameter to the end of the return URL (using any name and value you want) when you set up your button in PayPal e.g.
"http://your.wordpress.site/download/?dltoken=x34ggj45b"
Next, add pageguard short codes for the cases you intend to handle to your return page in WordPress –
[pageguard param="token" eq="x34ggj45b" title="Title for matched token"] Text to be output on matching token found [/pageguard] [pageguard tokenparam="token" ne="x34ggj45b" title="Title for failed match"] Error text for output when token fails to match [/pageguard] [pageguard tokenparam="token" absent="1" title="Title for missing token"] Error text for output when token is missing [/pageguard]
This will correctly display the main content for the page when Page Guard detects a matching token. It also provides for the possibility of providing different error content for the page in the event of the token being incorrect or missing.
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
fculross
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Add interactive image hotspots to your site to turn static visuals into clickable guided experiences that improve engagement.
Capture email leads with an email subscription form that collects addresses, saves entries, sends notifications, and helps grow your audience.
Show Instagram posts in a responsive carousel layout to enhance social proof and keep your site content visually fresh.
Transform PDFs into interactive flipbooks with a PDF flipbook widget that improves reading and keeps visitors engaged.
Use feature voting so users submit ideas, vote on requests, and help you prioritize product updates by real customer demand.

Add a Google powered search bar that delivers relevant results, improves navigation, and helps visitors find content fast.
Add interactive two-sided cards with flip effects to present front and back content in a compact, engaging format.
Show a GDPR-ready cookie notice that clearly explains how cookies are used, helping you stay compliant while creating a more transparent experience for your visitors.
Show RSS feed updates with an RSS feed slider that auto updates, displays posts in a smooth layout, and keeps visitors engaged.
Show real time visitor counts with a visitor counter widget that displays live traffic, builds social proof, and boosts engagement.
Use team members blobs to present your staff in a clear, creative format that builds trust, supports transparency, and strengthens brand credibility.
Showcase clips with a video slider that plays videos from multiple sources in a smooth slideshow, improving design and keeping visitors engaged.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
