WordPress Plugin with “Smart” Pilotpress Login Form

People who have built a Ontraport membership website using the Pilotpress WordPress plugin have reported that their users sometimes have trouble logging in or will appear to be logged in but won’t see any of the membership content on the page.

The source of the problem seems to be that the login to Pilotpress can get out of sync with the WordPress login. The user can be logged out of Pilotpress but still logged into WordPress. When this happens, the user can experience trouble trying to log in (because WordPress thinks they’re already logged in), or they don’t see membership content because they aren’t logged into Pilotpress, but the website behaves as though they’re logged in because they are logged into WordPress.

Since I am one of these Ontraport Pilotpress website owners with users experiencing this problem, I sought a solution using some WordPress PHP programming…and was able to fashion a WordPress plugin that resolves the problem..(!)

With this plugin, instead of using Pilotpress’ [login_page] shortcode to display the login form to your members, you use [pp_login_form].

If the user is properly logged out of both Pilotpress and WordPress, the login form displayed by [pp_login_form] will be the same exact one you would get using Pilotpress’ [login_page] shortcode.

However, if the user is logged out of Pilotpress but not properly logged out of WordPress, the user will instead see the message: “You are logged out. Please Log In” where “Log in” is a link to click. Clicking the link properly logs the user out of WordPress and then displays the Pilotpress login form.


  1. if the user is properly logged into both Pilotpress and WordPress, no form or message is displayed and the user sees the membership content on the page that they’re supposed to see.
  2. the [pp_login_form] shortcode can be used in a text widget (e.g., in a side bar or footer) to make it available on many/all pages throughout your WordPress website

Using this Plugin at your WordPress website

Once you have installed and activated* the “Conditional Pilotpress Login” plugin, you can start using it on any page or post at your WordPress website. Simply place the shortcode [pp_login_form] wherever you would normally (or where you currently have) the Pilotpress [login_page] shortcode.

Please note: you can style the “You are logged out. Please Log In” message if you’d like by using the “logged_out_msg” class specified in the DIV tag that surrounds the message in the HTML code.

If you find this plugin useful and would like to encourage me to provide other useful plugins for Ontraport and Pilotpress, please consider sending your appreciation to my PayPal account ( $5 / $10 / $15 )..

*Installing a downloaded zipped WordPress plugin file:

From the WordPress plugin menu click on Add New:

Instead of searching for a plugin you can directly upload your
plugin zip file by clicking on Upload:

Use the browse button to select the plugin zip file that was  downloaded, then click on Install Now. The plugin will be uploaded to your blog and installed. It can then be activated  (find it on the Installed Plugins page and click the “activate” link under the plugin called “Conditional Pilotpress Login Form”).

6 Replies to “WordPress Plugin with “Smart” Pilotpress Login Form”

  1. Nice solution! Thanks for sharing it with the community. One small improvement I would suggest. Currently the resulting content is flushed to the client out of order and will appear at the top of the page no matter where the shortcode was inserted into the page. If you just change the “echo” to a “return” on line 23 the login form or prompt will appear correctly on the page in place of the shortcode.

    1. Thanks Steve. Yeah, I used “return” in subsequent plug-ins and I guess I never came back to update this one. However, with the newer versions of Pilotpress, I’m surprised people still need this. Are you using it with the newest version of Pilotpress (currently at version 2.0.6)?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.