I am new to theming with wordpress. I have a theme layout with one sidebar at the right side of the website.
Now on my homepage and one other page i dont want to have the sidebar. On all other pages it needs to stay. How can i do this.
Any help would be appreciated.
Thanks.
You can tell WordPress to do not generate sidebar on specific page(s) with simple condition in your page.php file (or other relevant template file).
For example the following piece of code will disable sidebar on ‘About Me’ page.
*Note: you can use numeric ID or slug of your page inside the is_page() function.*
You will need to register another sidebar.Look at twenty theme,in function.php file for example how to do that.
You can do this by removing the sidebar tag
<?php get_sidebar (); ?>
from the page templates you want.If you use index.php as a homepage, you can duplicate it and name it homepage.php and remove the sidebar tag.
i suggest you to take a look at this pages:
http://codex.wordpress.org/Template_Hierarchy
http://codex.wordpress.org/Stepping_Into_Template_Tags