Hi all. I'm brand new to Wordpress and attempting to remove the content sidebar from the 2014 theme. I've found a lot of documentation in the forums, but most all say I need to remove the <?php get_sidebar(); ?> line from my theme's page.php. I'm having problems doing this though. I'm not using the 2014 theme as installed on my server. I created a child theme from the 2014 theme, as per the Wordpress codex. As such, my child theme directory does not contain a page.php file. Can anyone offer guidance? Thanks in advance.
Copy the page.php file into your child theme folder and delete the line from it there. It will supersede the one in the default folder (or should, assuming everything works normally!).
Thanks. I did that. The page.php file contains two potential snippets of interest. Should I just delete the first? <?php get_sidebar( 'content' ); ?> <?php get_sidebar(); get_footer();
I removed the first only, but the sidebar remained. I then removed both, and the sidebar still remained.
This will remove the sidebar called "content", assuming there are multiple sidebars. Did you remove the get_sidebar calls in ALL the templates? page.php is only used for pages: single.php is used for single posts, archive.php for archives, etc. (See http://codex.wordpress.org/Template_Hierarchy for a useful diagram.) Chances are you want to remove the sidebar on posts and have only removed it on pages.
>> Chances are you want to remove the sidebar on posts and have only removed it on pages. Ah you are correct. I had removed it for the page template, but was displaying a post on my home page. Thanks!