The Powerful WordPress Text Widget

by Sherryl Perry on June 25, 2012

Share Button

What is a widget anyway? Well, the simple explanation is that it’s a mini-app of sorts. You can use it to do something as simple as run a line of HTML code that displays a follow button in the sidebar of your WordPress blog or it can be a companion piece to a plugin. There are also several widgets that are part of the standard WordPress installation like a calendar, tag cloud and a search button. If you’re looking for a simple way to add functionality to your WordPress website, you may need to look no further than the simple text widget.

Text Widgets and YouTube

One of my clients has two distinct target markets. Her primary market is businesses that can benefit from her product and her secondary market is entrepreneurs who want to join her multi-level-marketing program. She wanted one website that would meet the needs of both niche target markets. We accomplished this partly by having separate pages for businesses and entrepreneurs.

This client has her own YouTube channel (with videos that she personally created) and she also has access to videos created by the company that she markets for. We wanted to showcase different videos in the sidebars of specific pages. To accomplish this, I followed these simple steps:

Embedding a YouTube Video into a WordPress Sidebar

#1) Locate the video that you want to include and click on the share button.

How to Embed a YouTube Video - Step 1#2) Click on the embed button.

How to Embed a YouTube Video - Step 2

#3) Copy and paste the code that appears. (Note: Set the width before you copy the code and the height will set proportionately.)

How to Embed a YouTube Video - Step 3

#4) Go into your WordPress Admin panel under Appearance, Widgets and drag a text widget into the sidebar where you want it to appear. You can either enter a title or leave it blank. Then, simply paste the code that you copied in step #3 into the box. Click on the save button and you should be done.

Controlling the Page that A Widget Appears On

As I mentioned earlier, I did not want each video to appear in the sidebar for every page. The solution that I used was to install the widget-logic plugin. (I installed and activated it prior to creating the text widget.)  As you can see in the screenshot below, I have entered a simple line of code is_page ( array( ‘business-uses’, ‘the-company’ ) ) in the “Widget Logic” box. In this instance the embedded YouTube video will display on two pages, business-uses and the-company. Widget Logic code can be a little tricky to learn but there are lot of tutorials and once you get the hang of it, you’ll be coding it in no time.

The Widget Logic WordPress Plugin

Widgetize Your WordPress Website

Widgets don’t need to be confined to the sidebar area of your website. For those of you who aren’t afraid of modifying your functions.php file and want to modify your WordPress template to incorporate a widget, check out How to Widgetize Your WordPress Theme in 2 Steps by Jeff Starr. For those of you who don’t know, Chris Coyier and Jeff Starr are the authors of the book Digging Into WordPress (which I highly recommend reading). This book was instrumental in my learning WordPress when I first started blogging and it continues to be a resource for me. (Its available as both a PDF/eBook and in print. Both versions include free lifetime updates of all future versions.)

Now, it’s your turn. What do you use text widgets for? Do you have any tips that you can share with the rest of us? Are there any other fans of Digging Into WordPress or do you have another favorite resource for mastering WordPress? As always, we’d love to hear from you.

Share Button
Jason February 26, 2013 at 2:30 pm

Hi Sherryl, does this widget work with any wordpress theme or it is only for specific default themes? Sorry if my question is very noob.

Sherryl Perry
Twitter:
February 26, 2013 at 10:43 pm

Hi Jason,
The text widget is part of the standard WordPress installation. It’s not dependent on themes at all. You’ll find it under Appearance > Widgets. If you install the “widget logic” plugin, you’ll see an extra field that will enable you to control which pages to have your text widget display in.

Enstine Muki
Twitter:
September 30, 2012 at 12:43 pm

Wow!
Sherryl, I have used the text widget but never thought I could limit it to pages. Your introduction widget-logic in this article spices up everything.

I’m glad I was on your blog today through one of Adrienne Smith’s articles
Enstine Muki recently posted..Do you deliver killer content in a broken container?My Profile

Sherryl Perry
Twitter:
September 30, 2012 at 3:27 pm

Hi Enstine,
Thanks for letting me know that you found my article helpful. I’m a huge fan of widget-logic. It makes it so simple to make your pages look different and avoid that “cookie cutter” look.

Thanks for letting me know that you found my blog through Adrienne’s site. I need to visit her blog again soon. She always has something interesting going over there.
Sherryl Perry recently posted..Tracking Changes to Your Website Blog and Social Media StrategyMy Profile

Nizam
Twitter:
August 14, 2012 at 3:11 pm

Wow! That’s really useful guide on adding text widget to the sidebar and adding a video on the sidebar is really a good idea. Thanks Sherryl for this wonderful post 🙂

Sherryl Perry
Twitter:
August 14, 2012 at 9:47 pm

Thank you for letting me know that you found my article useful Nizam. I appreciate the feedback.
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Sherryl Perry
Twitter:
August 2, 2012 at 10:37 pm

Hi Mike,
You’re very welcome. I’m glad I could help. I still remember when I was struggling with widgets and I found a post about widget logic. It was like a wave of relief came over me. It’s one of my favorite plug-ins.
Sherryl Perry recently posted..Content Writing: The Most Formidable Online Marketing StrategyMy Profile

Jacob July 22, 2012 at 3:44 am

The text widget is very useful, for posting videos, web forms, text and much more. Thanks I will share this article with my team.

Sherryl Perry
Twitter:
July 23, 2012 at 12:35 am

Hi Jacob,
Thanks for letting me know that you enjoyed my article. When I started blogging, I installed plugins for just about everything. Then, an update to a plugin went haywire and I was forced to either replace it or get a little creative. I realized that I could accomplish the same thing with a little code and the text widget. Ever since that day, I’ve been keeping an eye out for other plugins that I can eliminate.
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Glen July 18, 2012 at 1:19 am

Hello Sheryll,

I’m not too familiar with wordpress widgets yet as we do have our own sitebuilder. but this is interesting, really. Where do you think these little YouTube videos should be placed in the sidebar to be more eye catching? Below or Top of the fold?

Sherryl Perry
Twitter:
July 19, 2012 at 3:13 pm

Hi Glen,
I’m always wary of using sitebuilders because if you need to move your site to another hosting vendor, you almost always need to rebuild it from scratch.

As for placement of the YouTube videos, I try to put them as close to the top of the screen as possible, usually under my follow and subscribe buttons. The rule of thumb is if it’s important that it be seen, it really should go above the fold.
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Centrelink July 12, 2012 at 7:32 am

Thank you for not only sharing this Wordpress tool, but explaining their functionality to us. Overall I can definitely see how they would help you tremendously. Great article and great information as well thanks.

Sherryl Perry
Twitter:
July 12, 2012 at 5:30 pm

You’re welcome! I’m glad you learned something new that can help you. 🙂
Sherryl Perry recently posted..Is Your Email Address Part of Your Brand?My Profile

Kiril Hristov
Twitter:
July 10, 2012 at 11:02 am

The text/html widget is powerful and versatile. I’ve used it for adding AdSense and other ads(on self hosted Wordpress installs), MailChimp subscribe forms, social buttons and countless others. There really are little limitations when you think about it.

The most valuable thing for me in this post is the Widget Logic plug-in. I’ve been needing something like it for a very long time. It improves wordpress functionality so much, especially if you’re using it as a CMS for websites a bit more complex than a standard blog. Thanks, this is going to save a lot of time.

Sherryl Perry
Twitter:
July 11, 2012 at 6:01 pm

Hi Kiril,
Thanks for sharing some great examples of functions that we can add to our blog with text widgets.

I’m glad you found the info on the Widget Logic plug-in helpful. The code can be a little cumbersome to get used to at first but there are some great examples online.
Sherryl Perry recently posted..The 2012 Reader’s Choice Award for Best Marketing Strategy BlogMy Profile

Carlo St. Juste Jr., L.Ac
Twitter:
July 1, 2012 at 4:21 pm

Hi Sherryl great post. I’m a big fan of widgets and I’m always looking for ways to improve them and find new ones for my blog. Thanks for the idea of the youtube video, that’s brilliant!
Carlo St. Juste Jr., L.Ac recently posted..Why Ginger Is On The Top Of My Herb ListMy Profile

Sherryl Perry
Twitter:
July 1, 2012 at 5:17 pm

Hi Carlo,
Thanks so much for the kind words. I’m glad that my post gave you a new idea. Based on the responses that I’m getting to this article, I think I should write more posts like this (with practical and actionable ideas for WordPress blogs). I do appreciate the feedback.
Sherryl Perry recently posted..What Can You Do if Restoring Your WordPress Backup Doesn’t Work?My Profile

Bethany Lee
Twitter:
July 1, 2012 at 10:40 am

Fantastic! I have just started using video in my blog, and I was thinking about adding a video in my sidebar to serve as a “welcome” to new visitors! This is just the ticket for that–thanks!

Sherryl Perry
Twitter:
July 1, 2012 at 2:14 pm

You’re welcome Bethany. That’s great that the timing of this post seems to have been perfect for a few readers. (And to think that I almost didn’t write this post.)
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Becca June 30, 2012 at 9:18 am

I have no idea that there is other way to embed video in wordpress. Very interesting article that you’ve posted. Found the post to be quite informative. Thanks for sharing.

Sherryl Perry
Twitter:
June 30, 2012 at 4:58 pm

Thanks for letting me know that you like my article on inserting a YouTube video into the sidebar. (I’m sure you know that you can insert them into individual posts and pages too.)

Julieanne Case
Twitter:
June 29, 2012 at 9:10 pm

I really need to do this for both my blog and my website. I have youtube videos on Reconnective Healing. I think it would be a big boost to my website visibility. Thanks for the insight and instructions.

Julieanne Case
Always from the heart!

Reconnecting you to your Original Blueprint, Your Essence, Your Joy| Healing you from the Inside Out |Reconnective Healing | The Reconnection| Reconnective Art |

Sherryl Perry
Twitter:
June 29, 2012 at 10:33 pm

I’m so glad that I could help you Julieanne. Thanks for letting me know.
Sherryl Perry recently posted..Will Documenting Something Now Save You Time Later?My Profile

Jake Dewman
Twitter:
June 29, 2012 at 4:38 pm

That is a great post! it has helped me a lot in applying a YouTube link to widget! so thank you soo muchh Sherryl

Sherryl Perry
Twitter:
June 29, 2012 at 10:31 pm

You’re welcome Jake. I’m curious. Did you find my post through a search? (I don’t think we’ve met before and I’d be very happy to know that you found it so quickly. That would be good!)
Sherryl Perry recently posted..3 Steps to Protect Your WordPress Blog from HackersMy Profile

A.K.Andrew
Twitter:
June 29, 2012 at 9:24 am

What a fantastic post Sherryl – thank you so much. I look forward to finding the right youtube link for a widget.

Sherryl Perry
Twitter:
June 29, 2012 at 2:51 pm

You’re welcome A.K. I’m glad you liked it. I know that (in an earlier comment), Catarina recommended having a video made by professionals but I don’t mind home made videos with someone speaking earnestly to me. I plan on mustering up the courage to ask my husband to videotape me for my about page. It drastically needs a makeover and I think a personal video on our site is okay. (If I wait until I have the funds to hire someone, I may never do it.)
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Bharat Bhushan June 29, 2012 at 2:38 am

Hi Sherryl,
That was easily explained, great job.Makes it simple and no coding needed.
Great post that I need to bookmark for future reference.
Thanks for cool info!
Bharat Bhushan recently posted..ERP Software CompanyMy Profile

Sherryl Perry
Twitter:
June 29, 2012 at 2:42 pm

You’re welcome Bharat. I’m glad that your found my post helpful. It was inspired by an article I wrote a couple of weeks ago about adding your social follow buttons (Facebook, Twitter, LinkedIn etc.) using a text widget in your sidebar. (I’ve added the link to it below just in case that’s something that you would like to learn how to do too.) Thanks for taking the tie to let me know that you liked my article.
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Judy Stone-Goldman
Twitter:
June 29, 2012 at 12:37 am

Another great post that I need to bookmark for future reference. I suspect I’ll be calling on you if I decide I want this! Hoping to have better video capability in the future, in which case I’d want an easy way to post to YouTube. Thanks for creating such clear instructional blogs.

Judy Stone-Goldman
The Reflective Writer
Personal-Professional Balance Through Writing

Sherryl Perry
Twitter:
June 29, 2012 at 1:56 pm

You’re welcome Judy. I try to mix up my blog with a mix of “why” and “how” articles. I also try to not write specifically for either newbies or gurus because in a community, we all bring something different to the table and we can all learn from each other. Lots of times, there are great tips added in the comments (by readers who may not have benefited from reading the post) but they add value by being part of the conversation.

Good luck with video! I’m here if you need me. 🙂
Sherryl Perry recently posted..Can Your Small Business Compete with the Big-Box Stores?My Profile

Adrienne
Twitter:
June 28, 2012 at 7:42 pm

That was easily explained Sherryl, great job.

I LOVE text widgets. I have so much fun with those. I even created my own social share icons and then threw them in a text widget as well instead of installing yet another plug-in. You can do so many wonderful and cool things with them.

For people who aren’t that familiar with this, your explanation was right on. They’re going to love you for this.

Thanks for the cool info.

~Adrienne
Adrienne recently posted..How To Build Successful And Profitable RelationshipsMy Profile

Sherryl Perry
Twitter:
June 29, 2012 at 1:49 pm

Hi Adrienne,

Thanks for letting me know that you think I did a good job explaining this. I like your style of explaining things too.

It’s funny that you mentioned using a text widget for your social share icons. I recently wrote a post on how to do that and that article inspired this one.
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Keivn
Twitter:
June 28, 2012 at 1:36 pm

Thank you so much for the information, as you stated in one reply timing is everything. I hope to enter the world of blogging early next week and I find this very helpful.

Sherryl Perry
Twitter:
June 28, 2012 at 4:33 pm

Congratulations on taking the plunge into blogging Kevin.Thanks for letting me know that you found my post helpful. There’s a lot of great info online and many bloggers who truly would like to see you be successful. If you follow a few links in the comments, you’ll meet some other great bloggers that contribute here.

Keivn
Twitter:
June 28, 2012 at 8:10 pm

thanks, I have found some already and more everyday who help, give me advice and links to helpful blogs. I will take your advice and check things out.

Thanks

Kevin

Richard June 28, 2012 at 8:38 am

Hi Sherryl,

This is by far the most useful post I’ve read all week, I never knew adding a you tube video to your sidebar was as easy as adjusting the width, for some reason I expected it to be a complex process.

Thanks very much, this page is getting saved!

Sherryl Perry
Twitter:
June 28, 2012 at 2:07 pm

Hi Richard,
I appreciate your kind words and I’m happy to learn that you found my post “by far the most useful” that you’ve read all week. I try to blog a lot of helpful tips but every once in a while, I’ll be coding something that’s 2nd nature to me and I’ll think to myself that there’s probably a lot of people who don’t know how to do that. Hence, this post. 🙂

Anton Koekemoer
Twitter:
June 28, 2012 at 3:13 am

Hi Sherryl,

Having a Video shared in the navigation of your website can have major advantages and exposure to the community and the new visitors to your website. With WordPress – Personally – I would say almost everything is easier when the need arrives to customize. Especially with the amount of great plugins available and the power it allows you to customize widgets on your webpage.

Sherryl Perry
Twitter:
June 28, 2012 at 1:58 pm

Thanks for the reminder of the value of adding video to our websites Anton. Sometimes, there are really simple solutions available to add functionality to our websites. I’m always tempted to add plugins myself but the more familiar I am with WordPress, the more “AHA!” moments I have that make me realize that often, a little code in a text widget is all I really need.

It’s good to see you here!

Jackie
Twitter:
June 27, 2012 at 1:54 am

I must confess I’m a bit of a widget freak…wonder if there’s a support group for that 😉
I use them for just about everything. Images, text, video, social, popular posts, etc.

Like Susan, I’m on Headway too and I find it brilliant for customization. I do need to reduce the plugin load on the site though, just need to decide which to cull.

Sherryl Perry
Twitter:
June 27, 2012 at 12:37 pm

Hi Jackie,
I keep hearing some great things about Headway. I’ve already invested in the developer version of Thesis. So, I’m hoping that when they release 2.0 that it will be chock full of goodies like the widget logic capability.

BTW – If you do find a support group for widget freaks, let me know. 🙂
Sherryl Perry recently posted..The Powerful WordPress Text WidgetMy Profile

Jeannette Paladino blogging, branding
Twitter:
June 27, 2012 at 1:18 am

Sherryl — Great advice, as usual. I haven’t included a text widget with a video in my side bar. It would certainly fit. That might be the place for a very brief video in which I introduce myself to my readers. When I embed videos or images in my posts, I always upload them to a separate post I use for HTML code so I can see what they look like (as Susan does). Sometimes when you insert them directly into a post the code can get messed up if you upload more than one. At least that’s what I’ve found.
Jeannette Paladino blogging, branding recently posted..Stuck Trying to Learn WordPress? WPBeginner Offers Tutorials and TipsMy Profile

Sherryl Perry
Twitter:
June 27, 2012 at 12:34 pm

Hi Jeannette,
Thanks! I’m glad you liked my post. Carolyn mentioned video on the about page too. I have a bit of a phobia when it comes to videos of me but it’s time I got over it. I think having a brief video on your about page is a really good idea.

I’ve only run into an issue once inserting video into a post and the problem was that the video would not display until I published it. I was so certain that the code was correct that I finally just published it and held my breath. I don’t believe that I’ve ever tried to insert more than one video in the same post. Code can be quirky. 🙂
Sherryl Perry recently posted..Does Twitter Drive Traffic to Your Website Blog?My Profile

magic submitter June 27, 2012 at 1:08 am

Sheryl I’m waiting for your video. Great post. Widget is really helpful to customize my blog. Few years ago I didn’t know what the widget is. but I know it now and love it. its really helpful for those who have no idea in coding.

Karen June 26, 2012 at 9:18 pm

Many thanks Sherryl

Do you know any plugin that inserts youtube/vimeo/etc videos directly in your page?

Or I always have to follow this procedure

Sherryl Perry
Twitter:
June 27, 2012 at 12:23 pm

Great question Kim! You don’t need a plugin at all. When you’re editing your post, click on the “HTML” tab. Paste your code where you want your video to appear and then preview it. It’s that simple.
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Ray June 26, 2012 at 9:02 pm

I have embedded YouTube videos in a post on several occasions, but I never thought about or tried the sidebar. Some sites have very small sidebars so it might depend on how wide the available area happens to be. Also the YouTube embed code is kind of strange sometimes. It seems to work well with Wordpress, but sometimes the iframe code doesn’t work so well for me and I end up using the old embed code.
Ray recently posted..YouTube Videos are They Worth the EffortMy Profile

Sherryl Perry
Twitter:
June 27, 2012 at 12:11 pm

Hi Ray,
That’s a good tip about using the embed code. I agree that sometimes the iframe doesn’t work. I’ve never had an issue with it when I’ve placed it in the sidebar. I’ve noticed quirks when I’ve placed it into a post though. I had one video that I could not view it until I published it. It was really weird.
Sherryl Perry recently posted..SEO Should Be A Habit Not A HeadacheMy Profile

Catarina
Twitter:
June 26, 2012 at 10:28 am

What a clever way of posting your videos on your blog. I would if I had any that I had produced. Definitely. Maybe something for the future?:-)
Catarina recently posted..China the new Wall Street?My Profile

Sherryl Perry
Twitter:
June 26, 2012 at 7:52 pm

Hi Catarina,
I’m glad you found my article helpful. I should create video for my blog too. Search engines love them. Carolyn just mentioned having a video on your about page. I’m going to add that to my to-do list.
Sherryl Perry recently posted..Does Twitter Drive Traffic to Your Website Blog?My Profile

Catarina
Twitter:
June 27, 2012 at 1:42 pm

You should Sherryl. Just make sure it’s done by professionals. Most videos on blogs are terrible:-)

Could the the widget technique you write about be used to make a “like my facebook fan page” widget? Or maybe it’s better to just use the one you have on this page. It’s a plug-in, isn’t it? What is it called?
Catarina recently posted..China the new Wall Street?My Profile

Sherryl Perry
Twitter:
June 27, 2012 at 2:48 pm

Catarina,
I’m using the Facebook Like Box, which they refer to as a social plugin but it’s not actually a plugin at all. It generates code and then you would paste it into a text widget (step #4 of this post). You can generate the code here: https://developers.facebook.com/docs/reference/plugins/like-box/.

Catarina
Twitter:
June 28, 2012 at 9:37 am

Ran into the following instruction: Include the JavaScript SDK on your page once, ideally right after the opening tag.
Should that code go into footer.php that you find through appearance-editor- and then footer,php on the right? If so where on footer.php do i paste it. At the
bottom where it says ?

Have posted the code in the widget and saved. But it doesn’t appear on the page. Presumably because the java scipt has to be included?
Catarina recently posted..China the new Wall Street?My Profile

Sherryl Perry
Twitter:
June 28, 2012 at 2:14 pm

Catarina, I don’t remember running into anything about JavaScript. All I ever do is:
1) Change the URL at the top of the screen to be the FB page that I want people to “like”.
2)Set the “width” to be slightly smaller than the width of the sidebar that I’m placing it in.
3) I keep “Show Faces” checked off and I uncheck “Show stream”.
4) I click on “Get Code”.
5) Click on the IFRAME tab.

I just realized that I didn’t specify step #5! Sorry about that. That’s the code that you need. Thanks for letting me know you ran into an issue Catarina.

Carolyn
Twitter:
June 26, 2012 at 9:37 am

Hi Sherryl, This is very helpful, especially the YouTube video widget. I have seen blogs with their About video in the sidebar and have found them to be helpful.

I have used text widgets in my sidebar and find they give me greater control of my sidebar content. I’ve also used image widgets for custom widgets.

Very cool info, Sherryl!
Carolyn recently posted..How To Change Your Twitter ID SuccessfullyMy Profile

Sherryl Perry
Twitter:
June 26, 2012 at 7:50 pm

Hi Carolyn,
Image widgets are great too. I also like to display slideshows of products in sidebars too. Thanks for letting me know that you found the tips on incorporating YouTube videos helpful. You’ve just reminded me that I should do that for my about page too.
Sherryl Perry recently posted..4 Basic Steps to Better Blogging, Better Branding and More BusinessMy Profile

Carolyn
Twitter:
June 26, 2012 at 8:18 pm

Sherryl, I have been looking for a good slide show plugin for articles on my blog. Do you have a favorite one?
Carolyn recently posted..Poll: Which Email Provider Is Hacked the Most?My Profile

Sherryl Perry
Twitter:
June 27, 2012 at 1:25 pm

Carolyn, My favorite plugin for slide shows is NextGEN.

Susan Oakes
Twitter:
June 26, 2012 at 12:15 am

Hi Sherryl,

I use text widgets quite a lot for links, images or things i want to promote. I have a draft page that I use first so I can see what things look like and if I need to make any changes to colour, size etc. It’s then easy to copy and paste into a text widget.

I haven’t heard of the widget logic code but with my theme I can have different widgets on different pages easily. Makes it simple and no coding needed.
Susan Oakes recently posted..Play It SafeMy Profile

Sherryl Perry
Twitter:
June 26, 2012 at 7:48 pm

That’s wonderful that Headway includes logic for using widgets. Thesis 2.0 is coming out this fall. Hopefully, they’ll include that feature also. The fewer plugins we need, the better.

That’s a great tip about using a draft page to check everything out first. Thanks for sharing it.
Sherryl Perry recently posted..How to Add Follow Buttons to WordPress without a PluginMy Profile

Susan Cooper
Twitter:
June 25, 2012 at 6:07 pm

So that is how you do that (Youtube video thing). I am in the process of creating a video and when that is done we want to install it on my YouTude account and then add it to my website. You have just solved my dilemma. I am doing a happy dance. :-)))

Sherryl Perry
Twitter:
June 26, 2012 at 7:45 pm

Hi Susan,
Thanks for letting me know that my post inspired your happy dance! 🙂 Timing is everything, isn’t it?
Sherryl Perry recently posted..Thanks to SEO a Newspaper Reporter in Pennsylvania Found my BlogMy Profile

Previous post:

Next post: