• Resolved ephremfirew

    (@ephremfirew)


    Hello @kevinvess

    How to bypass the homepage translated by TranslatePress plugin?

    I tried a single URL bypass function and it doesn’t work for the homepage.

    I tried directory-based bypass custom function, and it works but allows all articles to be read by non-logged-in users. So I added a specific homepage path and also added an implode function with specific translated homepage path. But this also made me bypass article restriction.

    First I used this function:

    
        // Allow any page URL within the specified directory
        if ( in_array( 'am', explode( '/welcome', $url_path ) ) ) {
            $bypass = true;
        }
    

    And this then:

    
        // Allow any page URL within the specified directory
        if ( in_array( 'am', explode( '/welcome', $url_path ), implode( '/welcome', $url_path ) ) ) {
            $bypass = true;
        }
    

    What I want is to add exception for language url for non logged in users.

    I also added a single bypass function for all translated pages that are available for non-logged in users.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bypass issue with homepage translated by Translate Press Plugin’ is closed to new replies.