New Topic

Reply To: Sidebars not showing on Blog Page

Home › Forum › Help › Sidebars not showing on Blog Page › Reply To: Sidebars not showing on Blog Page

#1969

StartupWP
Keymaster

1. Add the following to the bottom of your child theme’s stylesheet:

body #content {
  padding: 4% 0 !important;
}

2. From the parent theme, copy over 404.php, archive.php, attachment.php, author.php, category.php, index.php, page.php, search.php, single.php, tag.php to your child theme.

3. Open them all up in either TextWrangler (for Mac), Notepad++ (for Windows) or whatever your favorite editor is.

4. Do a find and replace in all files for:

<section id="content" role="main">

with:

<aside id="lsidebar-sidebar" role="complementary">
<?php if ( is_active_sidebar( 'lsidebar-widget-area' ) ) : ?>
<div id="lsidebar" class="widget-area">
<ul class="xoxo">
<?php dynamic_sidebar( 'lsidebar-widget-area' ); ?>
</ul>
<div class="clear"></div>
</div>
<?php endif; ?>
</aside>
<section id="content" role="main">

5. Then do another find and replace in all files for:

<?php get_sidebar(); ?>

with:

<aside id="rsidebar-sidebar" role="complementary">
<?php if ( is_active_sidebar( 'rsidebar-widget-area' ) ) : ?>
<div id="rsidebar" class="widget-area">
<ul class="xoxo">
<?php dynamic_sidebar( 'rsidebar-widget-area' ); ?>
</ul>
<div class="clear"></div>
</div>
<?php endif; ?>
</aside>

6. Save your child theme, upload and activate.