Noobie Help with modification | WordPress.org

Hi– thanks for using Force Login!

First, you’ll need the following example script to bypass Force Login and make an exception for your landing page:

/**
 * Bypass Force Login to allow for exceptions.
 *
 * @param bool $bypass Whether to disable Force Login. Default false.
 * @return bool
 */
function my_forcelogin_bypass( $bypass ) {

  // Allow 'My Landing Page' to be publicly accessible
  if ( is_page('landing-page') ) {
    $bypass = true;
  }

  return $bypass;
}
add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );

Set the 'landing-page' string in is_page() to be your landing page slug or ID.

The rest of my advice is outside the scope of this plugin. I recommend you hire a developer to help you customize this for you.

Next, you may use the login_url filter to change what page WordPress links to for the login URL. The code example you shared should work, just set the site_url() to the custom login page you want.

Good luck!

Thread Starter
roseau

(@roseau)

Stylish, thank you very much.

Paul

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer