How to Create Custom Sidebars and Footers for Your WordPress Website

How to Create Custom Sidebars and Footers for Your WordPress Website

We tried coming up with a more exciting name for Custom Sidebars but what else do you call a plugin that gives you custom sidebars? Or more specifically, allows you to display different content in your sidebars and footers to different users who visit your site?

Custom Sidebars is now available as a free plugin on WordPress.org! Download Custom Sidebars

Without a doubt, Custom Sidebars is a must-have plugin, especially if you run a membership site. First-time visitors to your site don’t necessarily need to see the same content in your sidebars as regular visitors. Likewise, it makes sense to display different information (or widgets) to users who are logged into your site (such as account details), as opposed to users who are logged out.

Yes, the one-size-fits-all sidebars approach doesn’t work, which is why we created the aptly named Custom Sidebars plugin.

In this post, we’re going to run you through some examples of what you can do with Custom Sidebars to control the widgetized areas of your site and how to set it up.

Continue reading, or jump ahead using these links:

Why Use Custom Sidebars?

With Custom Sidebars you can create as many sidebar configurations for your site as needed – for first-time visitors or members, for specific pages on your site, for special landing pages, you name it – and trigger them to display as needed.

Here are a few examples of how you could use Custom Sidebars:

  • If you run a blog that features reviews, opinions, or tutorials, you could trigger a custom sidebar for each category that best reflects and supports the topic.
  • Share a calendar, promotional code, or special offer with logged-in users, based on their WordPress user role.
  • If you run an e-Commerce site, display a product list or list of featured articles.
  • Display advertisements only to users who aren’t logged into your site.

And here is what you can control in the backend of the free version of the plugin:

  • Sidebars for all the posts that belong to a category
  • Sidebars for all the posts that belong to a post-type
  • Sidebars for archives (by category, post-type, author, tag)
  • Sidebars for the main blog page
  • Sidebars for search results

Creating a Custom Sidebar

Once you’ve downloaded and installed the free plugin, head on over to Appearance > Widgets in your WordPress admin area, just as if you were going to style your theme’s default sidebar.

We’ve made this plugin’s implementation as streamlined as possible so that it blends right into the WordPress widget area you should already be familiar with.

Easy access to Custom Sidebar functionality
Easy access to Custom Sidebar functionality

You’ll see two new columns in the sidebar section to the right. If you have a sidebar or footer already styled and featured on your site at the moment, you’ll find that it’s still there under Theme Sidebars in the column to the very far right. To the left of that column, you’ll see a brand new column labeled Custom Sidebars, which is where any newly created sidebars will show up.

Steps To Create a New Custom Sidebar

1. Click on the blue button labeled Create a new sidebar located at the top of the page.

You’ll be asked to give your sidebar a name and an optional description. These details will help you keep track if you create multiple sidebars.

Click to create a new sidebar.
Click to create a new sidebar.

2. A checkbox offers advanced options for customizing the look of your sidebars and footers.

You can edit the wrapper code that goes before and after both the title and widget, or you can just leave this section so your sidebars take on your theme’s existing design.

3. Once you’ve added your sidebar, you can start interacting with it just as you would any regular sidebar in your admin.

Simply drag across widgets you want to use from the left side of the screen into the sidebar. Then you can toggle each widget into edit mode to play around with its customization options.

Advanced sidebar options on display
Advanced sidebar options on display
Drag and drop widgets to your sidebars.
Drag and drop widgets to your sidebars.

For faster custom sidebar creation, you can take advantage of the Clone button that appears on each widget beside the Save button. This makes multiplying your widgets a snap and saves time on individual customization.

If you find yourself needing to create and customize lots of different sidebars as quickly as possible on a regular basis, this will save you a lot of time and pernickety manual configuration.

Now that you have a brand new custom sidebar, in addition to the default one your theme has, it’s time to get it set up for the posts or pages where you specifically want it to show up.

Setting Up a Custom Sidebar for a Post or Page

First, make sure that your theme’s default sidebar (the one under the Theme Sidebars column) has the box checked for the option to allow the sidebar to be replaced.

FREE EBOOK
Your step-by-step roadmap to a profitable web dev business. From landing more clients to scaling like crazy.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

FREE EBOOK
Plan, build, and launch your next WP site without a hitch. Our checklist makes the process easy and repeatable.

By downloading this ebook I consent to occasionally receive emails from WPMU DEV.
We keep your email 100% private and do not spam.

Make sure you can actually replace your sidebar.
Make sure you can actually replace your sidebar.

If you don’t see this, scroll down to the very bottom of your screen and you should see the option labeled Allow this sidebar to be replaced at the very end, directly beneath all the widgets included in that sidebar.

This checkbox is important because it gives the plugin permission to swap out your theme’s original sidebar for your custom sidebars. 

You can leave this unchecked if you’re in the process of building your custom sidebars and setting up their display options but don’t want them published live on your site just yet. Just make sure you remember to check the box when you’re going live.

If you have a very specific post or page where you want your custom sidebar to show up in place of the theme’s original sidebar, navigate to that edit page in your admin and look for a new option labeled Sidebars to the right of the visual/text editor. This should show up somewhere beneath the Tags box.

The sidebars page panel.
The sidebars page panel.

This new option gives you a handy menu of your existing sidebars and lets you select your option. Select the sidebar you want to show up for that post or page, click to update it, and it should be visible on the page.

Again, if you find yourself using several custom sidebars on lots of different posts and pages, you’ll definitely want to take advantage of that cloning feature I mentioned previously.

Setting Up a Custom Sidebar for Categories, Post Types, and Archives

It’s reassuring to know you have the option of using a custom sidebar on any individual page or post you want. If you want to set up a sidebar on larger groups of pages, however, trying to get all that done by editing each individual page will be painful.

Custom Sidebars also lets you set up options for categories, post types, and archives.
Custom Sidebars also lets you set up options for categories, post types, and archives.

In this case, you can take advantage of using the plugin with some of WordPress’s most common classifications such as categories, post types, and even your archived content.

To assign a custom sidebar to larger groupings of pages, you need to head back into Appearance > Widgets and click the option on your custom sidebar labeled Sidebar Location. From here, you can define where you want sidebars to appear by matching the selected criteria.

  • For categories: Select the As Sidebar for selected categories checkbox. A list of your categories will appear for you to choose from.
  • For post types: If your theme supports post types, select the As Sidebar for selected post types checkbox to specify pages, posts, media pages, Google form pages, or any other types of your choosing.

For your archives, you have three different options to replace the theme sidebar:

  1. Set the custom sidebar to appear on archived posts and pages according to type. This includes post index, front page, search results, tag archives, date archives, and other types.
  2. Set your custom sidebar to appear on archived posts or pages included in certain categories.
  3. Set your custom sidebar up so that it only appears on archived posts or pages published by particular authors. Use selected tags to get even more specific.

Setting Visibility Filters for Specific Users

Believe it or not, Custom Sidebars offers even more options for displaying your sidebar or footer content to specific users. Next to the Clone button on every widget, there’s also a Visibility button. This useful option enables you to set filters and prevent certain types of users from being able to see sidebars.

You might, for example, want to share a members-only deal or special offer exclusively with users who are logged in. This would leave you free to show guests a more user appropriate piece of content like a prominent subscriber form or compelling sign-up offer.

If you already know you have a lot of different user types visiting your site, and want to explore different options with each one, this level of visibility control could really be worth experimenting with to keep people interested and engaged.

Importing and Exporting Your Custom Sidebars

Importing and exporting sidebars is simple.

As you continue to build more custom sidebars and set them up across all sorts of different pages and posts across your site, you’re definitely going to want to back everything up regularly to avoid losing all that hard work should something ever happen to your site. That’s where the import/export feature comes in super handy.

This is an essential feature to have if you consider your custom sidebar settings to be just as intricate and valuable as your content.

Personalizing Your Site With Custom Sidebars

Users want – and expect – personalized online experiences that are tailored to their needs. If you’ve ever used Amazon, you know exactly what I mean. Practically any WordPress website admin could increase user engagement if their sidebar and footer content was better tailored to more specific groups of users. This is why Custom Sidebars is an essential plugin for membership sites.

The plugin provides you with all the necessary tools for a powerful amount of flexible customization and allows you to clone widgets, control visibility, and back up your sidebars. Many WordPress site admins will wonder how they ever lived without it.

Have you customized the sidebars and widgets on your site? Do you use Custom Sidebars? If so, how have you used it to tailor your content? Let us know in the comments below.

Tags:

Aileen Javier Aileen has over 10 years of experience in content writing and content marketing. She’s handled content teams, planned editorial calendars, and managed projects. She’s also written blogs, web copy, social media posts, and email newsletters for brands in different industries.