Text widget in WordPress can do many things that you may never imagined. This is one of the most useful widgets in WordPress, provided you know how many things you can do with it. For example; do you know that you can add the code of Google Adsense, BuySellAds (or any other advertising network) in your text widget? You can add videos, images, banners, social buttons, links, affiliate links, subscribe form, author information box and many more such useful elements to your text widget.
How to Add a Text Widget in WordPress
This part is only for the beginners. If you’re familiar with this part, then skip to the next part of this article. To add a text widget, you don’t need to add any plugin, or do anything else as it is a part of WordPress.
You can add this widget to any of your widgetized area present in your theme such as sidebar, header, footer, or any other area. To add a text widget, go to Appearance > Widgets and then drag and drop the text widget to your preferred widgetized area, for example; to the sidebar.
Now that you are familiar with how to add this text widget to your WordPress site, let’s take a look at some basic text styling/formatting tips.
Adding Basic Text & Styling to Text Widget
<strong>Your bold text here</strong>
<em>Your Italicized text here</em>
<em>Your underlined text here</em>
<h2>My Heading 2 text here</h2>
<del>Your text here</del>
<p>New paragraph starts from here</p>
< br/> (add this where you want to start the text from a new line)
<a href=”http://yourwebsiteurl.com”>text here</a>
Hyperlink with an image:
<a href=”http://websiteurl.com/”><img src=”http://www.full-image-path.jpg” alt=”alt text here” /></a>
<li>First bullet list point</li>
<li>Second bullet list point</li>
<li>First numbered list point</li>
<li>Second numbered list point</li>
If you are not comfortable with adding the above code manually (and there’s no problem with that, as not everyone needs to be familiar with HTML), then here’s a tip. Go to Posts > Add New and from the Visual view, add the text, image, hyperlink, or any other element that you want in the text widget. Once you do this, switch to the “text view”, get the HTML code and paste it in your text widget. This way, you won’t need to manually type the HTML code.
Embedding a Video
To embed a video to the text widget, simply grab the embed code and paste it in this widget. For example; if you want to embed/add a video from YouTube, then open the video, click on Share and then on Embed. Enter the custom size (for example, you can add width as 600px) and then copy the code from there. Add this widget to your desired area, paste the code and hit the Save button.
Apart from all these basic elements, you can also directly add Google Adsense, Amazon Affiliate code and many other affiliate codes directly.
Adding a Google Map
If you are adding a Contact Us, Directions, Reach Us, or your address, then apart from only adding directions in text, you can also add/embed Google Maps to your sidebar or any other widgetized area. To do this, go to maps.google.com, search for your address using the Search bar, and then click on “Link” button. Copy the code from “Paste HTML to embed in website” and add it to your text widget. You might also like to learn how to embed Google Maps to posts in WordPress.