Sidebar Display on Every View
The default template shows the sidebar only on selected pages. I often make a design decision to display the sidebar on every or nearly every page. This is a fairly straightforward set of template edits. As an example, we will work with the template single.php. This is the template which displays individual posts
To gain further understanding of which template files are used when view a WordPress site visit WordPress Site Architecture.
Narrow Column
The default single.php has its content div set to widecolumn. This needs to be changed to narrowcolumn.
<div id="content" class="widecolumn"> to <div id="content" class="narrowcolumn">
Display Sidebar
Now display the sidebar by adding the following code just before the get_footer call.
FROM <?php get_footer(); ?> TO <?php get_sidebar(); ?> <?php get_footer(); ?>
Wow, it doesn’t get much easier than that! Now you know how to convert from without sidebar to with sidebar displays.
Reference links:






