Need to Remove Footer & Nav Menu
-
I’m working on a site for a client and I need to customize the password page. Right now, I have the form and password button but I need to remove the nav panel and footer.
I tried several CSS codes to remove them but I’m hitting a brick wall. Help is greatly appreciated!
The page I need help with: [log in to see the link]
-
Hello, you want to remove everything except the password form, that’s right?
Yes, and add a background image.
Hi Charique,
You can try adding the following code to your Admin Panel > Appearance > Customize > Additional CSS field:
header#site-header, footer { display: none; }Thanks!
Thanks! I’ll try that. Will it remove it from the whole site or just the password page?
Hello, add this code in the functions.php file of your child theme:
function prefix_password_protected( $return ) { if ( post_password_required() ) { $return = false; } // Return return $return; } add_filter( 'ocean_display_top_bar', 'prefix_password_protected' ); add_filter( 'ocean_display_header', 'prefix_password_protected' ); add_filter( 'ocean_display_page_header', 'prefix_password_protected' ); add_filter( 'ocean_display_footer_widgets', 'prefix_password_protected' ); add_filter( 'ocean_display_footer_bottom', 'prefix_password_protected' );Thanks!
You’re welcome 🙂
That worked!
I downloaded the child theme, imported my settings, and the page is now blank except for the form. I also need to put a placeholder background image on this page until my client gives me the actual image for the page.
I uploaded the placeholder image in the media library. What code can I use for this? The one I tried didn’t work.
Thanks
Hi, first, add this code in your functions.php file:
function prefix_password_protected_class( $classes ) { if ( post_password_required() ) { $classes[] = 'password-protected'; } // Return return $classes; } add_filter( 'body_class', 'prefix_password_protected_class' );Then add this css code:
body.password-protected { background-image: url(IMAGE_URL); }-
This reply was modified 8 years ago by
oceanwp.
-
This reply was modified 8 years ago by
The topic ‘Need to Remove Footer & Nav Menu’ is closed to new replies.
