The Powerful WordPress Text Widget

Share Button

Add functionality to your WordPress website using text widgets and the widget logic plugin. Embed a different YouTube video on each page of your website.

Share Button
The Power of the WordPress Text Widget
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

Author: Sherryl Perry

Welcome! If you're looking for help building an Internet presence that fits your needs and works for you, you're in the right place. I blog common sense articles about WordPress, social media and SEO. My goal is to help small business owners and entrepreneurs understand their core business. Together, we can develop and implement business strategies that make sense to you.

64 thoughts on “The Powerful WordPress Text Widget”

  1. 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.

    1. 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.

    1. 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

  2. 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 🙂

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

    1. 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

  4. 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?

    1. 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

  5. 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.

  6. 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.

  7. 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!

  8. 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.

    1. 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.)

  9. 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 |

    1. 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

  10. 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

    1. 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

  11. 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

    1. 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

  12. 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 recently posted..How To Build Successful And Profitable RelationshipsMy Profile

  13. 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.

    1. 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.

      1. 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.



  14. 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!

    1. 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. 🙂

  15. 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.

    1. 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!

  16. 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.

    1. 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

  17. 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

    1. 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

  18. 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.

  19. 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

  20. 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

    1. 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

      1. 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

        1. 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

          1. 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.

  21. 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

  22. 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

  23. 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. :-)))

Comments are closed.