
Page Guard Redirect 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 – redirection can be made to occur when the token fails to match what is expected (the alternative, i.e. redirect when token DOES match – is also included for completeness.)
The shortcode to use is ‘pgredirect’ – its attributes are:
tokenparam (required): a string value containing the name of the token URL param - e.g. 'mytoken' tokenvalue (required): a string value containing the expected value of the tokenparam - e.g. 'x34ggj45b' redirectURL (required): a string value containing the URL to redirect to (you can use an existing page as the target for the redirection - alternatively, for many configurations, setting this to a non existent page will make WordPress redirect to the default 404 "not found" page.) redirectWhen (optional): -> when = "1", redirects when match is found, otherwise defaults to redirect on non-match
Syntax examples:
redirect on non match (default) - [pgredirect tokenparam="mytoken" tokenvalue="1234abcd" redirecturl="http://my.redirurl.com/notfound" /] redirect on match (add redirectwhen="1" as an attribute) - [pgredirect tokenparam="mytoken" tokenvalue="1234abcd" redirectwhen="1" redirecturl="http://my.redirurl.com/notfound" /]
A typical use scenario might be to prevent 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 find the return page by chance!
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=Xc345Fd77"
Next, add a pgredirect short code to your return page in WordPress –
[pgredirect tokenparam="dltoken" tokenvalue="Xc345Fd77" redirecturl="http://your.wordpress.site/notfound" /]
This will cause a redirect if Page Guard Redirect detects either the lack of the expected token in the URL parameter, or a value which doesn’t match the one in the short code’s tokenvalue attribute.
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 a flexible size chart with visual guides and category tabs to help users choose accurate measurements while shopping.

Show Blogger posts automatically with a Blogger feed that keeps your content fresh, improves navigation, and helps visitors discover more of your work.
Show Threads posts in a live feed that keeps content fresh, builds social proof, and helps visitors engage on your site.
Show LinkedIn posts in a live feed that keeps updates current, builds credibility, and helps visitors engage with your brand.
Add social share buttons so visitors share content to major networks, boost engagement, and drive more referral traffic.
Display Bluesky posts with a Bluesky feed carousel that auto updates, shows posts in a clear layout, and keeps visitors engaged.

An Info List presents key details in a clear, structured format to improve user experience and support conversions.
Showcase images with an image carousel that rotates or slides visuals, improves design, and draws attention to key content.
Use an order form to let customers submit product orders, save entries, receive notifications, and collect payments through PayPal or Stripe for a smoother buying experience.
Add charts and graphs to your site to present data clearly, help visitors understand insights faster, and support more confident decision making.

Use an engagement toolbox that combines forms, galleries, chats, and interactive elements to increase visitor activity and create a more engaging user experience.
Show rankings and performance data on your site with a customizable scores board that motivates participation and keeps users 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!
