Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

How to Add a Sidebar to a Wordpress Theme

Olivia Rhye
Adding a custom sidebar to a WordPress theme

I recently needed a little more control over the sidebar on a theme and had never added a sidebar to a theme before. I wanted certain widgets to show up only on posts and the rest to show up on posts and pages. The below is how to add the sidebar:

In the functions.php page, we need to modify the code which looks like this:

To make it look like this:

Now, when calling a sidebar, we just need to call it by name as in the following:

Obviously we have freedom to name our sidebars as we please. Look for more info on making a sidebar only show up on posts in an upcoming post.

Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy