The Text Widget

The Text widget is simple but surprisingly flexible. You can use it anywhere you want
to wedge in a bit of fixed content. For example, you can use it in a sidebar, to add
a paragraph about yourself or your site. Or you can put it in your footer with some
copyright information or a legal disclaimer.
However, the Text widget becomes much more interesting if you stick some markup
in it. Since it recognizes HTML markup, you can stuff in lists, links, pictures, and more.
(In fact, WordPress self-hosters often use the Text widget to stuff in a video or an
image, as explained on page 188.) Figure 5-23 shows two uses of the Text widget.
Using the Text widget is easy. First, drag it onto your page (as with any other widget).
When you expand it, you get a nice big, multiple-line text box. If all you want
is ordinary text, just fill in a title and type in your text underneath. Make sure you
also turn on the “Automatically add paragraphs” checkbox. That way, wherever you
separate the text (by pressing the Enter key), WordPress inserts an HTML line break
element (that’s <br>) that, in turn, inserts the space you want.

It’s almost as easy to put HTML in the Text widget. First, turn off the “Automatically
add paragraphs” settings. Then, type in your content, with the exact HTML tags you
want. Here’s an example that puts a word in bold type:
The following word will be <b>bold</b> on the page.
And here’s the HTML-formatted text from Figure 5-23 (right):
The <b>Magic Tea House</b> is a quirky mash-up: it’s a fine tea importer with
the rarest gourmet teas, and a music venue for small-venue jazz, chamber, and
coffeehouse bands like:
<ul>
<li>The Black Teas</li>
<li>Cosmic Harmony</li>
<li>U.V.Q.</li>
<li>Samantha Told Me So</li>
</ul>
See our <a href=”http://tinyurl.com/cyboj83″>location</a>.
If your HTML skills are a bit sketchy, you can copy markup from an HTML editor into
the Text widget. Before you do, make sure you look over the markup and strip out
any unnecessary details, like inline styles. That gives it a better chance of blending
into your site without disrupting the rest of your WordPress page.

The Text Widget

Taming the Tag Cloud

What do I do if my tag cloud shows too many tags? Or not
enough? Or makes the text too big?
The Tag Cloud widget is surprisingly uncustomizable. If you use
fewer than 45 tags, it shows every one of them (although it
ignores any tags you added to the Posts→Tags list but haven’t
yet used in a post.) If you use more than 45 tags, the Tag Cloud
widget shows the 45 most popular.
Occasionally, people want a tag cloud with more tags. But
usually they have the opposite concern and want a smaller
tag cloud that’s slim enough to fit into a sidebar without
crowding out other widgets. If you want to tweak a tag cloud
on a WordPress.com site, you’re out of luck. But if you run a
self-hosted site, there are options. One solution is to crack open
your template files. That’s because the behind-the-scenes code
(the PHP function that creates the cloud) is actually very flexible.
It lets you set upper and lower tag limits, and set upper
and lower boundaries for the text size. You can get the full
details from WordPress’s function reference at http://tinyurl.
com/wptagcloud. (However, this information won’t be much
help until you learn how to dig into your WordPress theme files
to change your code, a topic explored in Chapter 13.) Another
solution is to search for a plug-in that lets you pick the tag
options and then generates a customized tag cloud. You’ll learn
how to find and install plug-ins in Chapter 9.

Taming the Tag Cloud

categories cloud

NOTE If clouds work so well for tags, it might occur to you that they could also suit categories, especially
in sites that have a large number of categories, loosely arranged, and with no subcategories. Happily, a category
cloud is easy to create. If you use WordPress.com, the handy Category Cloud widget does the job. If you self-host,
you’ll notice an extra setting in the Tag Cloud widget: a list called Taxonomy. To create your category cloud, change
the Taxonomy setting from Tags to Categories.

categories cloud

I Have Even More Widgets!

The list of widgets in Table 5-3 includes all those that a
self-hosted WordPress site starts with. But if your site is on
WordPress.com, you’ll find the Widgets page stocked with a
number of preinstalled extras, including widgets that let you
share posts with nifty web services like Facebook, Twitter,
Flickr, Goodreads, and Delicious. So what’s up?
The discrepancy reflects the way WordPress handles plug-ins.
If your site is on WordPress.com, you can’t install plug-ins, so
you’re limited to whatever Automattic offers in the Widgets
window. For that reason, the company tries extra hard to
include a broad set of useful widgets for everyone.
Self-hosted WordPress sites start out with fewer widgets, but
you can add more—in fact, as many as you want—through
plug-ins. You can start by adding all the WordPress.com
widgets to your site with the Jetpack plug-in (page 297)..
Finally, it’s worth noting that some themes come with their
own specialized widgets. Usually, you can recognize them by
the fact that the widget name starts with the theme name,
like Twenty Fourteen Ephemera (which is included with the
Twenty Fourteen theme).

I Have Even More Widgets!