[Theme: TwentyTwelve] Custom Sidebar drops below post
-
I’m attempting to create a sidebar that shows some photographs taken at random from the Nextgen Gallery.
When I load the NextGen Widget in the default sidebar it nicely shows some random images in de sidebar.
When I create a custom sidebar, this sidebar drops below the posts.
This is what I’ve done so far:
In Functions.php:
register_sidebar( array( 'name' => __( 'Photography Sidebar', 'twentytwelve' ), 'id' => 'sidebar-4', 'description' => __( 'Appears when using the optional Photography template with a page.', 'twentytwelve' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) );
Created a new template file photo-page.php:
<?php get_header(); ?> <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 --> <?php dynamic_sidebar('sidebar-4'); ?> <?php get_footer(); ?>
Nothing fancy, but I can’t seem to get the customsidebar to show up on the right hand side of the website. It drops to below the post.
On the same page, the default sidebar displays nicely on the right hand side, the custom doesn’t. Only shows below the post.
Again, in the default it works fine.
But as soon as I used this custom sidebar it only shows up below the post. Even when I re-create the default sidebar in the custom one, it drops below the post.What am I missing here?
I can’t provide a link as it is on an internal server.
- The topic ‘[Theme: TwentyTwelve] Custom Sidebar drops below post’ is closed to new replies.