Wordpress theme, sidebar location
I bought a non-wordpress theme that I'm currently adapting to wordpress. The only problem I have is the location of the sidebar. It loads in the same area as the main content for some reason.
End of header file:
<!--Content Sec -->
<div id="content_sec1">
<!--Main Section-->
<div class="col1">
And the start of the footer file:
</div> <!--col1 end -->
<div class="col2">
<?php
/*
* Load the sidebar
*/
get_sidebar();
?>
</div>
As said the sidebar loads in the end of the col1 div instead of in the col2 div as it should. The col2 div remains empty.
Any ideas 开发者_运维技巧why this happens?
Based on what we've discussed, I assume that there is a call to get_sidebar() somewhere between header and footer - take a look at single.php, page.php, etc. Or just run a grep in the theme directory and see where it is: grep -rn 'get_sidebar' .
精彩评论