How to easily add a widget area to WordPress

Does your WordPress theme not have enough widget areas? Do you want to add a widget to an area that does not have a widget area? No problem. This is a simple, easy-to-follow tutorial showing how to add a widget area to WordPress.

Step One

How to easily add a widget area to WordPress - Bent Corner
Open up an FTP client and go to the themes folder on the web site’s server and select the child theme for your website. If you are not using a child theme, you really should, but I’m not going to tell you how to run your life.

Then, move a copy of functions.php and style.css to your desktop. In Filezilla, this means selecting the files in question and simply dragging them to the desktop.

You can keep local copies of a child theme’s files on your computer, but I prefer to grab fresh copies off the server if I need them. With local copies, you sometimes run the risk of customizing older versions of the child theme’s files. When you grab copies of the server, that will not happen. Reload the website to make sure there’s not an error in the PHP, which will result in the dreaded white screen of death.

How to easily add a widget area to WordPress - Bent Corner
The graphic novel White Death by Robbie Morrison and Charlie Adlard. Oddly enough, not about PHP errors in WordPress.

Step Two

Open functions.php in the editor of your choice. Go to the bottom of the file and add the following code:

You will want to rename name_of_widget_area to something that will identify your new widget area in the code. You will also want to rename “Name of Widget Area” to something that will identify your new widget area on the Appearance > Widgets screen in WordPress.

Once you’ve done that, save functions.php and move it back to the server.

Step Three

Go to Appearance > Widgets in WordPress. You should now see your new widget area.

Go back to your FTP client and navigate to the file where you want to place the new widget. I’m using the default Twenty Sixteen WordPress theme as the parent theme, and Claire Brotherton’s most excellent child theme for Twenty Sixteen.

Since I wanted to add an extra widget area under the author area and above the comments section on single posts, I grabbed a copy of content-single.php using my FTP client and moved it to my desktop. I then added the following code at the bottom of the entry-content division, where I wanted the new widget area to appear.

The heart of the modification is line 3. It is what inserts the new function added to functions.php in step three into the theme. I placed the code in an aside with after-author-info as the ID as well as the class.

Step Four

Now it’s only a matter of making the new widget area look pretty. Open the style.css file you moved to your desktop in Step One and at the bottom of the file, add new CSS selectors for what you named the new ID and another for the new class. Then style them as needed. This is what I added to my style.css:

You’ll need to move the modified style.css to your server to see your changes.

Once you’re done, go ahead and delete the files you moved over to your desktop. If you need them again, go into your FTP client and grab fresh copies.

In Conclusion

There’s really no limit to the number of widgets you can add to WordPress. I’ve seen some non-blog websites where almost everything is added as a widget. I don’t think I would ever do that, but the possibility exists.

If you have any questions, please post a comment.

WordPress 5.0 is the New Coke of WordPress

I logged into this blog this morning and saw that I had an update to install. It’s for WordPress. 5.0 “Bebo.”

WordPress 5.0 is the New Coke of WordPress - Bent Corner
Update my site to WordPress version 5.0? Not today Satan.

I am not going to update my blog to version 5.0. Instead, I will wait for version 5.03 or higher before I even think about updating WordPress.

I have no reason to update my blog to version 5.0. The bulk of the update seems to be to add Gutenberg, a new editor. It’s totally different from the current editor. WordPress touts it as, “A whole new way to use WordPress.

What if I don’t want a whole new way to use WordPress?

If you’ve ever written an article on Medium, you will recognize Gutenberg. It borrows heavily from the Medium interface. Maybe people want that. All I know is I don’t. If I wanted a Medium-like experience, I’d write more articles on Medium. I don’t want that so I don’t do that.

Gutenberg seems to be a top-down change. People who use WordPress to create websites and blogs seem to be perfectly happy with the existing editor. People at the top, people like WordPress co-creator Matt Mullenweg are the ones clamoring for a new editor. If you install version 5.0 and you still want to use the regular editor, you have to install a plugin called Classic Editor. According to Mullenweg, it will be supported until 2021. As of this morning, it already has over 700,000 active installs.

WordPress 5.0 is the New Coke of WordPress - Bent Corner
Matt Mullenweg

WordPress 5.0 is very much like New Coke. It’s a change no one asked for meant to replace something no one wanted to be changed.

What is with the name Bebo?

Bebo Valdés
Bebo Valdés

The fact that WordPress 5.0 has the dumbest name of all the WordPress versions is appropriate. Would anyone name a new car model Bebo? Nope. It’s named after Cuban jazz musician Bebo Valdés. Who likes jazz music you might ask? Matt Mullenweg, that’s who. Like more normal human beings, I hate jazz music. It’s pretentious and annoying. I’d rather listen to country music or even Jimmy Buffett than the noise pollution known as jazz music. I hate country music and I hate Jimmy Buffett, just not as much as jazz.

Update (8 December 2018)

Unfortunately, I awoke this morning to discover my site automatically updated to WordPress 5.0. I don’t understand how that happened as I have automatic updates turned off. Even if I didn’t, I don’t think major updates automatically update.

I didn’t realize it even happened until I opened up the editor to write a new post and I discovered Gutenberg on my screen. I quickly installed Classic Editor and everything seems to be okay now.

I’m not someone who fears or avoids change. I just don’t see the need for swapping tools without a reason. Much like a hammer is the best tool for driving nails, the pre-WordPress 5.0 editor is the best tool for writing blog posts.  It’s not like I’ve never given Gutenberg a try. I did and didn’t like it.

I have a feeling I’m not alone on this.