Quantcast
Channel: Site5 Free Premium WordPress Themes » All Posts
Viewing all articles
Browse latest Browse all 8865

Reply To: Sidebar not working

$
0
0

i think i’ve found a solution. i’ve created a child theme, of course, where to apply the changes.
if you use ‘blog page’ as page format, you get the sidebar fine on your page.
so i went in page.template.blog.php and copied the code.

i changed single.php from this:

<?php get_header(); ?>
		<!-- begin main -->
		<section class="main block grid4">
		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
			<?php include('part.post.php') ?>
			<?php comments_template(); ?>
		<?php endwhile;  endif;?>
		</section>
		<!-- end main -->
<?php get_footer(); ?>

into this:

<?php get_header(); ?>
		<!-- begin main -->
		<section class="main block grid4">
			<div class="column-one">
		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
			<?php include('part.post.php') ?>
			<?php comments_template(); ?>
		<?php endwhile;  endif;?>
			</div><!-- end .column-one -->
			<div class="column-two">
				<?php get_template_part( 'blog', 'sidebar' ); ?>
			</div><!-- end .column-two -->
		</section>
		<!-- end main -->
<?php get_footer(); ?>

one thing to make sure is that you copy the file part.post.php in your child theme folder, otherwise the <?php include('part.post.php') ?> call fails.

hope that helps


Viewing all articles
Browse latest Browse all 8865

Trending Articles