Can someone tell me where to add my wordpress sidebar code, so the sidebar appears on the left? I took a theme with no sidebars, created my sidebar and everything, but can not figure out where call it <div align="left"><?php get_sidebar(); ?></div> PHP: So far its either on top or on bottom of the whole text. Any ideas? Thanks!
If your sidebar is going to appear to the left, place the code directly beneath the header. To the right, directly above the footer.
This isn't always the case. Logically, you'd want to position the sidebar as low as possible in the source code to let searchbots read through the main page content first. In that case, you'll use floating divs to posion your content blocks, no matter if your sidebar is designed to be on the left or on the right, you can still place it underneath the main content code block.
Place this div tag <div class="sidebar">YOUR SIDEBAR CODE</div> within your sidebar.php file. Add this to your CSS file, if you have one. .sidebar { float: left; /* Puts the sidebar on the left side of the page */ width: 180px; /* You can change your sidebar size */ } Code (markup): In your index.php file place <?php get_sidebar(); ?> above the footer. Hope this helps