Skip to content
WordPress.org
  • Showcase
  • Plugins
  • Themes
  • Hosting
  • News
    • Learn WordPress
    • Documentation
    • Education
    • Forums
    • Developers
    • Blocks
    • Patterns
    • Photos
    • Openverse ↗︎
    • WordPress.tv ↗︎
    • About WordPress
    • Make WordPress
    • Events
    • Five for the Future
    • Enterprise
    • Gutenberg ↗︎
    • Job Board ↗︎
    • Swag Store ↗︎
  • Get WordPress
Get WordPress
WordPress.org

Plugin Directory

Private Content Login Redirect

  • Submit a plugin
  • My favorites
  • Log in
  • Submit a plugin
  • My favorites
  • Log in

private-content-login-redirect

By Abhisek
  • Details
  • Reviews
  • Development
Support

Description

This plugin has been closed as of July 24, 2023 and is not available for download. Reason: Guideline Violation.

Reviews

Redirect to login but no back redirection

pleclerc September 20, 2017
Redirect to login but no back redirection even we guess the wp-login/ url look like to indicate a future redirection. My page have two level./partenaires/annuaire-partenaires/ I look at the developper code, it’s really too simple, can cause many problems.

Exactly what I needed!

Gustavo S. Serra September 9, 2017
Exactly what I needed!

Took me too long to find this simple plugin

frogdogtech January 31, 2017
This plugin does exactly what it needs to while remaining non-invasive. Utilizes the built in wordpress private page status. Brilliant. Thanks.

Work perfectly!

gtamborero October 4, 2016
hidden pages goes to login 😉 You can also get the function inside the plugin and use it your functions.php theme: function private_content_redirect_to_login() { global $wp_query,$wpdb; if (is_404()) { $private = $wpdb->get_row($wp_query->request); $location = wp_login_url($_SERVER[“REQUEST_URI”]); if( ‘private’ == $private->post_status ) { wp_safe_redirect($location); exit; } } } add_action(‘template_redirect’, ‘private_content_redirect_to_login’, 9);

Works as described

smart.u September 3, 2016
Does it’s trick, very helpful, thank you.

Does what it says.

eisgeist September 3, 2016
I’ve been searching for a little while for a plug-in doing a simple thing -that IMHO should be part of base WordPress capabilities-: redirect a visitor to login page when he/she tries to access a restricted page. To my needs, it simple and effective.
Read all 12 reviews

Contributors & Developers

“Private Content Login Redirect” is open source software. The following people have contributed to this plugin.

Contributors
  • Abhisek

Translate “Private Content Login Redirect” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Meta

  • Version 1.0.1
  • Last updated 10 years ago
  • Active installations N/A
  • WordPress version 3.0 or higher
  • Tested up to 4.6.30
  • Advanced View
  • About
  • News
  • Hosting
  • Privacy
  • Showcase
  • Themes
  • Plugins
  • Patterns
  • Learn
  • Documentation
  • Developers
  • WordPress.tv ↗
  • Get Involved
  • Events
  • Donate ↗
  • Five for the Future
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org
  • Visit our X (formerly Twitter) account
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • Visit our Facebook page
  • Visit our Instagram account
  • Visit our LinkedIn account
  • Visit our TikTok account
  • Visit our YouTube channel
  • Visit our Tumblr account
Code is Poetry
The WordPress® trademark is the intellectual property of the WordPress Foundation.