• Resolved mad99

    (@mad99)


    Hi,
    Would like to use WPS Hide Login with bricks builder and the “custom authentication pages” in settings in it.
    Have create a “Login” Page (also “Lost Password” and “Reset Password”.) All of them are working fine when I use them hardcoded in url: https://website.com/login

    BUT no matter what I enter in the settings, (even with or without the clickbox “Disable login Bypass”) used the defined “hidden Page” in WPS Hide Login (https://website.com/hidden-door), it always redirect to the ORIGINAL login page of WP. Which would be accessible under wp-admin. INSTEAD of showing the login page created with Bricks under /login that should used by WPS Hide Login and the setting under Login-Url: https://website.com/ [ hidden-door].

    If I deactivate WPS Hide Login Plugin, the login page created with Bricks Builder is displayed via https://website.com/wp-admin.

    Does anyone have any idea what I am doing wrong or need to do differently, to make WPS Hilde Login work together with Bricks Builder Custom Authentication Page?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    Thanks for using WPS Hide Login.

    Are wp-login.php and /wp-admin pages excluded from cache ?

    Thread Starter mad99

    (@mad99)

    Hey MaximeWPS,
    thank you for reply and your question.
    It is local dev-environment -> NO cache-plugins or similar stuff. So, no cache at all.
    Do you have experiences with bricks Builder? Should your plugin works out-of-the-box with the custom athentication page from Bricks?
    Or what could cause the problem?

    Plugin Support MaximeWPS

    (@seinomedia)

    Not at all…

    Please contact the theme support first. We’ll be able to add a filter with their recommendations.

    Thread Starter mad99

    (@mad99)

    Thank you MaximeWPS!

    Have asked in the bricksbuilder-forum topic that I have created parallel to this request -> https://forum.bricksbuilder.io/t/how-to-use-wps-hide-login-plugin-with-bricks-bulider-custom-authentication-pages/20525

    Hope I get some advice, so I can share with you.

    • This reply was modified 8 months, 4 weeks ago by mad99.
    Thread Starter mad99

    (@mad99)

    Hey MaximeWPS,
    I found 2 filters thanks to google for use in bricks builders custom authentication pages.
    https://academy.bricksbuilder.io/article/filter-bricks-auth-custom_redirect_url/
    https://academy.bricksbuilder.io/article/filter-bricks-auth-custom_login_redirect/
    (and follow).
    I′m not a hardcore wordpress-hacker, but as I understand the first one could be a match of your request.
    As I understand the code :

    add_filter( 'bricks/auth/custom_redirect_url', function( $custom_redirect_url, $current_url_path ) { if ( /* custom condition based on $current_url_path */ ) { return 'https://example.com/custom-redirect'; } return $custom_redirect_url; }, 10, 2 );



    I could use the value of “url_path” from the setup in your WPS Hide Login Plugin setup-page: “hidden-door”. But this would be a bad “static” solution and dangerous when it comes to change.

    Would be better to use a dynamic placehoder out from your plugin. Do you have some kind of this shortcode/variable: Like $wps_hide_login_url_path to use in this filter?
    Like in this fictional example:

    add_filter('bricks/auth/custom_redirect_url', 'custom_redirect_url_filter', 10, 2);
    
    function custom_redirect_url_filter($custom_redirect_url, $current_url_path) {
        // Check if WPS Hide Login plugin is installed and activated
        if (class_exists('WpsHideLogin') && function_exists('wps_hide_login_get_settings')) {
            // Get WPS Hide Login settings
            $wps_hide_login_settings = wps_hide_login_get_settings();
    
            // Check if the custom condition based on $current_url_path is met
            if ($current_url_path === '/wp-admin') {
                // Check if a custom redirect URL is set in WPS Hide Login settings
                if (!empty($wps_hide_login_settings['url_path'])) {
                    return esc_url($wps_hide_login_settings['url_path']);
                }
            }
        }
    
        // Return the default custom redirect URL if conditions are not met
        return $custom_redirect_url;
    }

    Would you think, I have correctly understood the possible implementation/use function in the context of your plugin? And what would be the correct code/plugin variables to include the dynamic values from the settings of your plugin and how would the control queries be correctly integrated?

    This way I can try it out and give you feedback without having to wait a long time for feedback from the forum.

    • This reply was modified 8 months, 4 weeks ago by mad99.
    • This reply was modified 8 months, 4 weeks ago by mad99.
    • This reply was modified 8 months, 4 weeks ago by mad99.
    Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    I understand this snippet shoult be put into your theme functions.php instead of WPS Hide Login files.

    Please try and replace ‘https://example.com/custom-redirect’ by you secret URL.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WPS hide login used with bricks builder? Best Practice/Solution?’ is closed to new replies.