Twenty Eleven – Page Template
-
Hey Folks – I am trying to create a widget area for the top of each page, right under the menu for Twenty Eleven. I created a new page template; code is here:
<?php /** * Template Name: TEST Template * Description: A Page Template that adds a sidebar to pages * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); ?> <div id="primary"> <?php if ( is_active_sidebar( 'custom' ) ) : ?> <div class="widget-area"> <?php dynamic_sidebar( 'custom' ); ?> <?php endif; ?> <?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 --> <?php get_sidebar(); ?> <?php get_footer(); ?>
Everything went well, but I’ve managed to push the sidebar down on page…… https://108.167.147.21/~mrmaz00/another-test-page/
TIA!BTW – the image of the young girl is in the custom widget from this thread!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Twenty Eleven – Page Template’ is closed to new replies.