BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › Hide header completely
Tagged: hide header
- This topic has 16 replies, 4 contibutors, and was last updated 9 years ago by Anonymous.
-
Question
September 28, 2015 at 7:04 am #47330@keenHi
I want to create a login page without a header or footer. Hiding the footer is easy, but obviously as the header is part of admin I can’t.
Is this possible?
Many thanks.
Answers
September 28, 2015 at 10:43 am #47348@
AnonymousHi @keen, header.php contain most of js and css
WordPress enqueue js and css at footer and header both.
you can trim it down inside the custom page templateRegards
Varun DubeySeptember 30, 2015 at 6:09 am #47543@keenHi Varun,
Can you go into a bit more detail for me?
Many thanks.
September 30, 2015 at 10:47 am #47561@
AnonymousHi @keen,
You can remove those division which you do not have to use at your login page to get minimized header code
LikeLine 34 to Line 346
and copy remain part to your page template at top instead of call get_header()
It will include all js and css without including header
wp_head() is the main function which enqueue all the js and cssRegards
Varun DubeyOctober 3, 2015 at 6:43 am #47803@keenOK, I think I’ve understood you. I’ll give it a go! Thanks.
October 3, 2015 at 10:37 am #47810@
Anonymous🙂
October 3, 2015 at 2:22 pm #47849@keenHi Varun,
I’ve removed those lines of code and tried using an alternative header call and directly copying and pasting into the template file.
I’ve created a new template and selected that for my register page, but the page is still using the boss/page.php template and not the one in my child theme.
Should I have just removed lines 34-346 or something else? Could removing those lines prevent the selected template from being used?
Many thanks
October 5, 2015 at 2:56 am #47928@
AnonymousHi @keen, You can simply remove those line of codes form page template file
and header will be minified only on those pages on which this specific page template will be selected.Regards
November 16, 2015 at 3:11 pm #51887@keenHi,
Sorry I missed this response. I’m pretty sure that’s what I did and it didn’t work. Can you confirm that I should be removing exactly and only from lines 34-346?
Thanks.
November 17, 2015 at 8:12 am #51962@
AnonymousHi @keen
It is more simplified now with modular header.phpyou just need to remove
<header id="masthead" class="site-header" data-infinite="<?php echo ( boss_get_option( 'boss_activity_infinite' ) ) ? 'on' : 'off'; ?>"> <div class="header-wrap"> <div class="header-outher"> <div class="header-inner"> <?php get_template_part( 'template-parts/header-fluid-layout-column' ); ?> <?php get_template_part( 'template-parts/header-middle-column' ); ?> <?php get_template_part( 'template-parts/header-profile' ); ?> </div><!-- .header-inner --> </div><!-- .header-wrap --> </div><!-- .header-outher --> <div id="mastlogo"> <?php get_template_part( 'template-parts/header-logo' ); ?> <p class="site-description"><?php bloginfo( 'description' ); ?></p> </div><!-- .mastlogo --> </header><!-- #masthead -->
Regards
Varun DubeyDecember 16, 2015 at 3:42 am #54519@unstoppablerecordingmachinethe header.php is being included regardless of calling it in a blank page template.
I created a file called “joeysturgis.php” and put this in it:
<?php /* Template Name: Joey Sturgis */ ?>nothing
Then I uploaded this file to the sociallearner folder next to files like “single.php” and “header.php”
Then I went to my Sample Page and changed the Page Template to Joey Sturgis
Then I hit update and refresh my page, and the title bar and search bar is still there. I go to the inspector and check the source code and inside the body classes I see that “page-template-joeysturgis” is being used.
December 16, 2015 at 7:09 am #54546@
AnonymousHi @unstoppablerecordingmachine, Try this code it will give you a page without header, footer sidebar.
<?php /** * Template Name: Custom Template */ ?> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="msapplication-tap-highlight" content="no"/> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title><?php wp_title( '|', true, 'right' ); ?></title> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/images/favicon.ico" type="image/x-icon"> <!-- BuddyPress and bbPress Stylesheets are called in wp_head, if plugins are activated --> <?php wp_head(); ?> </head> <body> <div id="scroll-to"></div> <div id="panels" class="<?php echo (boss_get_option( 'boss_adminbar' )) ? 'with-adminbar' : ''; ?>"> <div id="main-wrap"> <!-- Wrap for Mobile content --> <div id="inner-wrap"> <!-- Inner Wrap for Mobile content --> <div id="page" class="hfeed site"> <div id="main" class="wrapper"> <div class="page-full-width"> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> <?php comments_template( '', true ); ?> <?php endwhile; // end of the loop. ?> </div><!-- #content --> </div><!-- #primary --> </div><!-- .page-full-width --> </div><!-- #main .wrapper --> </div><!-- #page --> </div> <!-- #inner-wrap --> </div><!-- #main-wrap (Wrap For Mobile) --> </div><!-- #panels --> </body> </html>
Regards
December 16, 2015 at 7:28 am #54547@unstoppablerecordingmachineI just tried that, and it doesn’t work. I don’t understand why. It just loads the page like normal. It seems like page templates are completely ignored or something. Unless I use a built in one, yet the custom one is in the list.
December 16, 2015 at 7:29 am #54548@unstoppablerecordingmachineI’m trying to do this for the Home Page. When I use the page template for a normal page, it works. When I tried to put it on the Sample Page marked as the Front Page, it doesn’t work.
December 18, 2015 at 2:28 am #54678@
AnonymousHi @unstoppablerecordingmachine, Please remove
<?php wp_head(); ?>
from above code and try again.Regards
- The question ‘Hide header completely’ is closed to new replies.