Support » Plugin: Force Login » Unable to bypass login on Podcast feed at /feed/podcast

Viewing 1 replies (of 1 total)
  • Plugin Author Kevin Vess

    (@kevinvess)

    Hi– thanks for using Force Login!

    When I visit your site– it appears to be working. I can only access your feed URL, while the homepage redirects me to login.

    However, you might find the is_feed() conditional tag useful. For example:

    /**
     * Bypass Force Login to allow for exceptions.
     *
     * @return bool Whether to disable Force Login. Default false.
     */
    function my_forcelogin_bypass( $bypass ) {
      if ( is_feed() ) {
        $bypass = true;
      }
      return $bypass;
    }
    add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass' );

    Also, you should only add the code to one place, primarily your current theme’s functions.php file. If you’re using a child theme, only add it to the child theme’s functions.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘Unable to bypass login on Podcast feed at /feed/podcast’ is closed to new replies.