Add Sidebar To WordPress Default Theme Pages

If you are still using the WordPress default theme or a customized version it may not show the sidebar on the pages. If you are using the static front page option you may want to add the WordPress sidebar on pages. If this is the case you can add the sidebar to the default WordPress theme pages very easily.

Click on Design from the main panel and then Theme Editor. On the right side you will see a list of the current theme’s templates. If you see a “Page Template” click that and the code will appear in the editor box. Copy all the code in the editor and paste it into Notepad or Wordpad and save the file on your computer for backup. Now at the very bottom of the editor box you should see this bit of code:

</div>

<?php get_footer(); ?>

That is telling the page template to get the themes footer, what we are going to do is tell the page template to also get the sidebar. Replace the above code with the following code and click “Update File”

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

If you don’t see a “Page Template” then try the same steps above with the “Main Index Template” but be sure to copy the unedited code first into Wordpad or Notepad so you can put things back if they don’t work. Keep in mind that all WordPress themes are a little different and made by many different people so the files in them will vary.

If you managed to corrupt your theme’s templates files and it’s not displaying properly or worse you can’t even see your blog; go back and paste in the unedited text you saved and click “Update File” to put things back. What? You didn’t save a backup? Well then you will need to delete the corrupt file in your hosting account and upload an unedited version of it. Not sure what file you messed up? Man, you are a butcher! Then upload a complete unedited version of the entire template to your hosting account.

Knowing how to add the WordPress sidebar to a page template is a great way to use a specific landing page that doesn’t change yet still looks like the rest of your WordPress blog.

The final step in this WordPress guide can be found on here: Add Background Color To Single Page Sidebar On Default WordPress Theme

Similar Posts:



Tags:

If you liked this post, feel free to leave a comment that is relevant to the post or subscribe to the feed and get future articles delivered to your feed reader.

Sorry but due to the spamming of a few all comments are moderated and will appear when approved and all drive-by comments will be deleted!

Comments

niche thanks for info

Reply

Wow, well at least I know where to come when I start tackling my WordPress blog. You certainly do live up to your reputation. I have bookmarked your blog for future reference.

Thank you for the information

Leon Bowes

Reply

You’ve given a good technique for adding the side bar on wordpress default theme pages and that will be the most useful one.

Reply

Thanks for this information! I’ve been using the default theme page; now I know how to add a sidebar! Cool!

Reply

I followed the instructions, but unfortunately when I did it, my sidebar is sent to the bottom of the page (on the content pages)… when i tried moving it to the top, the sidebar appeared where I wanted it to, but then the blog post would move down the page. Is there a way to fix this? (I’m using the default theme). Thanks for your time.

Reply

Steven I would actually need to see what you did and your code in order to troubleshoot it for you. I suggest you make sure the code is correct and in the correct place. You may be missing a closing tag or have an extra one or something like that.

Sorry but I can’t possibly fix everyone’s blog who asks. But if you are using the default theme I suggest trying another, there are so many good free themes available.

Reply

Great advice here. You may need to change the column style to ‘narrow’ at the top of the page in order to leave room for the sidebar. Look at ho it’s done on the ‘page’ code compared to the ‘post’ code (which is set to ‘wide’ by default in this theme.)

Reply

Leave a comment
Drive-By comments will be deleted! Like "Thanks for sharing", "Nice post", or any other text that doesn't contribute to the discussion. If you ask a very specific question about your particular WordPress theme, it will probably be deleted. I can fix your WordPress site but for a price. If you ask a question like "Why don't my blog work right", it will be deleted. If you ask a question about your WordPress site without a leaving a link to it, it will be deleted. The point is to ask questions and or comment on the the actual content of the post, and to please use some common sense. All comments are moderated and will appear when approved. Thank you.

(required)

(required)