WordPress.org

অসমীয়া

  • থীমসমূহ
  • প্লাগিনসমূহ
  • News
  • সাহায্য
  • বিষয়
  • অৱদান আগবঢ়াওক
  • যোগাযোগ
  • WordPress লাভ কৰক
WordPress লাভ কৰক
WordPress.org

Plugin Directory

Redirect to login if not logged in

  • প্লাগিন দাখিল কৰক
  • মোৰ প্ৰিয়বোৰ
  • লগ ইন কৰক
  • প্লাগিন দাখিল কৰক
  • মোৰ প্ৰিয়বোৰ
  • লগ ইন কৰক

This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Redirect to login if not logged in

Daan Kortenbach-ৰ দ্বাৰা
ডাউনল’ড কৰক
  • বিশদ বিৱৰণ
  • পৰ্য্যালোচনা
  • ইনষ্টলেশ্যন
  • বিকাশ
সাহায্য

বৰ্ণনা

Redirects users to the login page if the user is not logged in. After login the user gets redirected to the original entry page. For advanced users a filter is provided to override the redirect.

The principle behind this plugin is to redirect all users – from every post, page, archive, etc. – to the login page (usually wp-login.php). Except for the override filter it does nothing else.

Overriding the redirect

  • Note: This plugin may not be for you, a membership plugin might be a better fit. Chris Lema writes excellent reviews of +30 membership plugins here: http://chrislema.com/category/memberships-plugins/

If you do have a need for this plugin and you want to exclude specific views under specific conditions, a filter is provided to override the redirect.

To override the redirect the filter must return a boolean value of true. WordPress core provides many conditional tags that either return true or false or you can write your own conditionals.

Take a look at the Conditional Tags page on The WordPress Codex for some inspiration.
https://codex.wordpress.org/Conditional_Tags

Usage:
Copy/paste/edit an example to the functions.php of your theme or create a new file in wp-content/mu-plugins/ if you do not wish to edit your theme.

Note: Be carefull not to use multiple filters at the same time as that may cause unexpected results. Instead use multiple conditions in one filter.

  • Override if the front page is either posts or a page:

    add_filter( ‘rtl_override_redirect’, ‘is_front_page’ );

  • Override if the post is ‘hello-world’:

    add_filter( ‘rtl_override_redirect’, function() {
    return is_single( ‘hello-world’ );
    });

  • Override if the page is ‘sample-page’:

    add_filter( ‘rtl_override_redirect’, function() {
    return is_page( ‘sample-page’ );
    });

  • Override if the page ID is 42, the slug is ‘sample-page’ or the title is ‘About Me’:

    add_filter( ‘rtl_override_redirect’, function() {
    return is_page( array( 42, ‘sample-page’, ‘About Me’ ) );
    });

  • Override if the page ID is 42 or a post is ‘hello-world’:

    add_filter( ‘rtl_override_redirect’, function() {
    if ( is_page( 42 ) || is_single( ‘hello-world’ ) ) {
    return true;
    }
    });

ইনষ্টলেশ্যন

  1. Upload redirect-to-login-if-not-logged-in to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

সঘনাই উত্থাপিত প্ৰশ্ন

Installation Instructions
  1. Upload redirect-to-login-if-not-logged-in to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

পৰ্য্যালোচনা

plugin causes infinite redirecton loop – not working

maorb এপ্ৰিল 18, 2019 3টা প্ৰত্যুত্তৰ
plugin causes infinite redirecton loop – not working

How to Allow Some IP?

arthurfrank জানুৱাৰী 18, 2019
How do we allow access to some IP numbers? This is really important to me. Is it possible to allow more than 1 IP number?
আটাই 11টা পৰ্য্যালোচনা পঢ়ক

অৱদানকাৰী আৰু বিকাশকাৰীসকল

“Redirect to login if not logged in” হৈছে মুক্ত উৎসৰ ছফ্টৱেৰ। এইসকল লোকে এই প্লাগিনত অৱদান আগবঢ়াইছে।

অৱদানকাৰীসকল
  • Daan Kortenbach

আপোনাৰ ভাষাত “Redirect to login if not logged in” অনুবাদ কৰক।

বিকাশৰ প্ৰতি আগ্ৰহী?

ক’ড ব্ৰাউজ কৰক, SVN ৰিপজিটৰী চাওক নাইবা RSS-দ্বাৰা বিকাশৰ পঞ্জী ছাবস্ক্ৰাইব কৰক।

সলনি-পঞ্জী

1.7.0

  • Add redirect override filter.
  • Add filter examples.

1.6.3

  • Fix svn repo.

1.6.2

  • Version file mismatch fix.

1.6.1

  • WordPress 4.2 compatibility update.

1.6

  • WordPress 4.1.1 compatibility update.

1.5

  • Complete rewrite to use the already existing auth_redirect hook.
  • Strips ‘?loggedout=true’ from redirect url after login.

1.4

  • Moved the conditionals to the init hook due to some edge cases not redirecting.

1.3

  • Plugin naming.

1.2

  • Releasing to the WordPress plugin repo.

1.1

  • Cleanup.
  • Now using wp_login_url() in redirect.

1.0

  • Initial version.

মেটা

  • 1.7.0 সংস্কৰণ
  • 7 বছৰ আগত শেষবাৰ আপডে’ট হৈছিল
  • সক্ৰিয় ইনষ্টলেশ্যন 200+
  • WordPress-ৰ সংস্কৰণ 3.0.1 বা অধিক
  • ইমানলৈকে পৰীক্ষা কৰা হৈছে 5.0.22
  • ভাষা
    English (US)
  • loginredirect
    টেগবোৰ
  • উচ্চখাপৰ ভিউ

ৰে’টিংবোৰ

5টাৰ ভিতৰত 4.8টা তৰা।
  • 9টা 5-তৰাযুক্ত পৰ্য্যালোচনা 5টা তৰা 9
  • 0টা 4-তৰাযুক্ত পৰ্য্যালোচনা 4টা তৰা 0
  • 1টা 3-তৰাযুক্ত পৰ্য্যালোচনা 3টা তৰা 1
  • 0টা 2-তৰাযুক্ত পৰ্য্যালোচনা 2টা তৰা 0
  • 0টা 1-তৰাযুক্ত পৰ্য্যালোচনা 1টা তৰা 0

Add my review

See all reviews

অৱদানকাৰীসকল

  • Daan Kortenbach

সাহায্য

কিবা ক’বলগীয়া আছে? সহায় লাগে?

সাহায্যৰ ফ’ৰাম চাওক

  • সন্দৰ্ভ
  • বাতৰি
  • হ’ষ্টিং
  • গোপনিয়তা
  • প্ৰদৰ্শনী
  • থীমবোৰ
  • প্লাগিনবোৰ
  • আৰ্হিবোৰ
  • শিকক
  • সাহায্য
  • বিকাশকাৰী
  • WordPress.tv ↗
  • জড়িত হৈ পৰক
  • অনুষ্ঠানবোৰ
  • দান কৰক ↗
  • ভৱিষ্যতৰ বাবে পাঁচ
  • WordPress.com ↗
  • মেট ↗
  • 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
ক’ডেই কবিতা।