Marko Jaric
asked 6 years ago

I am trying to create a page template with no menu bar and no footer, but most of he styling for the page appears to occur in the footer.  Is it possible to create a page template with no menu bar the top and no footer at the bottom.

1 Answers
DominicStaff
answered 6 years ago

If you want to create a page template with no menu bar & footer section, you can do as the following:
– Create a page template (e.g: template-fullwidth.php) then add the following code:

<?php
/**
* Template Name: Full Width2
*/ get_header(); ?>
<div id="primary" class="site-content span12">
<?php while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header --> <div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'dw_focus' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> --> <?php endwhile; // end of the loop. ?>
<?php comments_template( '', true ); ?>
</div>
<?php get_footer(); ?>

– Then add the following code to the style.css file:

.page-template-template-fullwidth-php #colophon { display: none; }
.page-template-template-fullwidth-php .wrap-navigation { display: none; }
.page-template-template-fullwidth-php .top-news { display: none; }
.page-template-template-fullwidth-php .site-header #header { display: none; }
.page-template-template-fullwidth-php #primary { padding-top: 50px; }

If you still face there issue, you can send me a screenshot & your site for further checking.
Hope this helps !

Powered by DW Question & Answer Pro