Make “sidebar template” the default template for new pages

On Twenty Eleven or on its child themes the default template for new pages is a template with no sidebar. I don’t know why this is like this; it seems to me that the designers of WordPress are still not thinking about CMS functionality in some places.

For example the most obvious place to put a menu in a CMS is the sidebar. But with Twenty Eleven the only way to show a menu in all pages is to explicitly set all the pages to “sidebar template”. I would think it’s a design bug, as the only solution so far is to tell everyone to “don’t forget to set the new pages to “sidebar template””.

I’m sure there must be a single line in functions.php which changes the default action but I don’t know what that line is. Could you tell me what should I write in functions.php to set all new pages to “sidebar template” when using Twenty Eleven?

I’m sure that it has been asked before but I really couldn’t find it anywhere using the search function.

1 Answer
1

just add <?php get_sidebar(); ?> to page.php in your child theme and all pages will have a sidebar. look at sidebar-page.php to see where to place it.

Leave a Comment