Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1310892
    Cocchini.MD
    Participant

    https://missionmedschool.com/intro/

    The background, positioning and font doesn’t match the global theme. How can I theme this splash page? This is not a 3rd party members plugin, this is a result of checking the “password protected” option on the page’s visibly settings.

    #1310894
    Cocchini.MD
    Participant
    This reply has been marked as private.
    #1311211
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! Because what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // An X custom password protected post/page
    // =============================================================================
    function x_custom_password_protected() {
        global $post;
        $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
        $o = '<div class="x-protect"><form class="mbn" action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post">
        ' . __( "To view this protected post, enter the password below:" ) . '
        <div><label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" maxlength="20" /></div><div><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /></div>
        </form></div>
        ';
        return $o;
    }
    add_filter( 'the_password_form', 'x_custom_password_protected' );
    // =============================================================================

    The output will look like this:

    Please let us know if this would work out for you.

    #1321058
    Cocchini.MD
    Participant

    I appreciate the response but wasn’t able to get it working.

    I went to my child theme and that exact code was already added to functions.php I’m guessing it was there from when you tested it. The format of the page has changed but the white background is still there. The images of what the output should look like is also not appearing.

    #1321405
    Rad
    Moderator

    Hi there,

    It inherits your global styling, I checked it from your customized and it’s your own button’s global style. As for the code, please provide your FTP login credentials as well.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1310892 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>