drizzlesauce
Member
Posted 2 years ago #
I'm trying to put together a blog where there's 2 sidebars (one on each side of the content column), but only for the index.php page. For the other pages, I want the left bar to disappear and for the content column to expand into that space. Sort of like at Under the Radar (if you click on the single post). Does anyone know how to do that? Or is there a naked theme that does that which I can customize? Thanks!
ninenote
Member
Posted 2 years ago #
First of all, make sure that your files listed in correct order.
http://codex.wordpress.org/Template_Hierarchy
Then, instead of using get_sidebar() in template, use include('sidebar1.php') in index.php and include('sidebar2.php') in page.php
where sidebar1.php is the code for index.php and sidebar2.php is the code for page.php
Better to name your sidebar templates to sidebar-1.php and sidebar-2.php and then use:
get_sidebar('1');
and
get_sidebar('2');
See
http://lists.automattic.com/pipermail/wp-hackers/2010-January/029857.html
drizzlesauce
Member
Posted 2 years ago #
worked perfectly. thanks so much!