• Resolved futureyoon

    (@futureyoon)


    Hi

    Advanced Tools > Security Headers >
    I changed the wp-login.php to domain.com/signin

    Upon this change, I found my login page (domain.com/signin) layout looks funny and discovered that one of the classes in the body is missing.

    Let’s say the class is “login-split-page”. How do I add this class back to the body of the signin page?

    Please guide me on this.

    Thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hi @futureyoon,

    Thank you for contacting us.

    Are you currently using any specific plugin for your login page? Any theme option that may adjust the login form? Please also try to clear any caching your site may have both on site level and server level.

    Let us know how it goes.

    Best,
    Jonathan S

    Thread Starter futureyoon

    (@futureyoon)

    i am using buddyboss theme… no other plugins for login but buddyboss theme has its own login page setup but not sure how “login-split-page” class is dropped out when enabling Security Headers…

    that’s why I was hoping to just add back the class to the body… maybe by jquery or javascript or functions something?

    • This reply was modified 3 years, 11 months ago by futureyoon.
    Thread Starter futureyoon

    (@futureyoon)

    Hi

    I have a question and a suggestion

    I have added the following code in the code snippet.

    add_filter( ‘body_class’, ‘add_custom_class’, 10, 1);
    function add_custom_class( $classes ) {
    if ( is_page( ‘signin’ ) ) {
    // 57 is your desire page id for example
    // if ( is_page ( ‘home’ ) ) { // the slug of page
    array_merge( $classes, array( ‘login-split-page’ ) );
    }
    return $classes;
    }

    but still I dun see the class is being added. Is there something wrong with above code?

    a suggestion.
    do you think if you can add the following feature in the plugin like this screenshot?
    https://prnt.sc/116yud1

    that will settle some cases & issues like mine for long term?

    Anyway I really hope to get the code validated, so that the login page works back normal.

    Thank you

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @futureyoon

    Can you try this code instead?

    add_filter( 'login_body_class', 'mu_custom_login_classes' );
    function mu_custom_login_classes( $classes ) {
       if ( ! function_exists( 'buddyboss_theme_get_option' ) ) {
          return $classes;
       }
       if ( buddyboss_theme_get_option( 'boss_custom_login' )
          && buddyboss_theme_get_option( 'admin_login_background_switch' )
          && $GLOBALS[ 'pagenow' ] !== 'wp-login.php'
       ) {
             $classes[] = 'login-split-page';
             return $classes;
       }
       return $classes;
    }

    About the request, we sent it to the plugin developers for further discussion too.

    Let us know if the new script worked
    Best Regards
    Patrick Freitas

    Thread Starter futureyoon

    (@futureyoon)

    That solved the issue!!!! Awesome!!! Thank you so much!!!

    Thread Starter futureyoon

    (@futureyoon)

    i am not sure if I should continue to write here but I see another issue with this feature…

    it’s not working with redirect..

    scenairo is as below.
    let’s say
    domain.com/dashboard is a private page > so it will redirect to domain.com/sign-in page with ?redirect-somethingsomething.

    after logged in, it should go back to the initial private page, right? but that part is not working…

    can you help fix this too?

    Thank you

    Thread Starter futureyoon

    (@futureyoon)

    Let me know if you need another thread for this issue but in overall, it’s about the Advanced Tools > Security Headers.

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @futureyoon

    Sorry for the delay here.

    We are having an issue receiving notification when the ticket is set as resolved.

    Could you create a new ticket for this problem? We try to keep the issues threads per subject.

    Best Regards
    Patrick Freitas

    Thread Starter futureyoon

    (@futureyoon)

    OK. Opened a new thread for that. FYI
    https://www.ads-software.com/support/topic/body-class-is-gone-continue/
    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘body class is gone’ is closed to new replies.