It depends on your theme but generally it would be something like:
<?php
if(!is_home()) {
//add sidebar
}
?>
Thread Starter
bejjj
(@bejjj)
Thanks potentweb!
For example for TwentyEleven, where would you put these lines ?
Thanks!
I don’t think on TwentyElleven you can. Your going to have to find a theme where you can modify it to be able to perform that task. Not all themes are alike.
Thread Starter
bejjj
(@bejjj)
Such a simple thing ? Impossible on TwentyEleven, are you really sure ?
I think you should be able to add the code potentweb provided to the index.php file of the TwentyEleven theme in order for this to work.
<?php
if(!is_home()) {
get_sidebar();
}
?>
The “get_sidebar” call is currently at the bottom right above get_footer.
Although I’m not 100% sure if this will through off the layout (potentweb may be on to something).
Thread Starter
bejjj
(@bejjj)
I found a very nice solution …………
No need for coding : you can select different Layouts of pages : “Page with sidebar” or Page without sidebar!
So what I need is already possible by default with TwentyEleven!