Styling the Text Widgets

Posted: July 2, 2013 in Programing
Standard image alignment CSS styles such as alignleft, alignright, and aligncenter apply for images:

To specifically style the various default styles of the WordPress Text Widget, use the following example:

<div id="primary">
	<li id="text-1"><h3>Widget Title for First Text Widget</h3>
		<div>Text within the text widget area.</div>
	<li id="text-2"><h3>Widget Title for Second Text Widget</h3>
		<div><p>Text for second widget text area.</p></div>

Adding Code to the Text Widget:

Basic HTML, embeds, and JavaScript are added easily to the WordPress Text Widget.

Most embed codes from social sharing sites for multimedia will work in a WordPress Text Widget. However, active code and programming languages such as PHP will not work as the Widget will strip out code it cannot display.

To add active code to the Text Widget, use one of the many WordPress Plugins from the WordPress Plugin Directory that override WordPress restrictions on using PHP in posts. Check that they will work on Widgets as some will not.

Using RSS Widgets:

There are two built-in WordPress RSS or Feed Widgets. The RSS Links displays a list of the links to various core WordPress feeds on your site for Posts and Comments. The RSS allows you to integrate an external feed source for content into a Widget area of your site, such as your Twitter account, Facebook posts, Google+ posts, or other blogs.

The RSS Links Widget offers the option to title the section and choose which type of feeds to offer to visitors to add to their feed reader. This widget does not display feed content, just the links to the feeds.

  1. Posts will displays the most recently published content in their feed reader.
  2. Comments displays the most recent comments in their feed reader.
  3. Posts and Comments displays a combination of both in their feed reader.

The visitor will typically click the link to add the feed to their feed reader.

The RSS Widget displays the most recently published content from any source with an active feed. This is an ideal way of integrating outside content into your site.

By default, WordPress RSS Widgets display the post title or the first 100 or so characters of a Tweet or long untitled post. These are either in the form of a link or features a link to the original source depending upon the feed’s design and structure.

  1. Enter the RSS feed URL in the first form, copied from the source page for the content you wish to include in your sidebar or other widgetized space.
  2. Give the feed a title: This is optional and gives you the chance to showcase the source of the content.
  3. How many items would you like to display: By default, 10 are show, but you can choose from 1-20 posts.
  4. Display item content?: This allows you to show an excerpt of the content not just the title.
  5. Display item author if available?: If you wish to give credit to the original author of the content, check this to display the author.
  6. Display item date?: If available, the date of the original content will be shown.

You may add multiple RSS Widgets for incoming feeds to your WordPress sidebar and other widgetized areas of your site.

  1. Thank you for sharing this post copied from the WordPress Codex. I would have loved to have read your original thoughts on WordPress Text Widgets as there are so many creative things you can do with them. I’ve written an entire article on the subject which was featured in the WordPress Codex article you copied. I hope it is helpful to your needs and to the reader’s needs on the subject of Text Widgets in WordPress.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s