Using widgets to display content

Widgets are a great little piece of WordPress that allow you to drag and drop little pieces of content to special places on the site. If you’re familiar with widgets in general, feel free to skip this next section.

What are widgets?

Widgets are drag-and-drop blocks of content that can be placed in certain areas in your WordPress site. There are a certain number of them that come with WordPress out of the box, but themes and plugins can add even more.

Widgets are controlled at Appearance > Widgets. The “Available Widgets” area is where all the possible widgets are stored. To add a widget, simply click, hold, and drag from the widgets header into an open place on the right, called a widget area.

wpwb_widget_drag_and_drop

Make sure to click the down arrow on the widget area you’d like to use before you drag the widget over, if that area is closed.

Once you’ve dropped the widget, it’s saved and should be displaying on the site. Adjust the settings in the form that appears and click Save for that widget when you’re finished. To take a widget off the site, just click Delete for that widget.

Native widget areas

The WP Writer’s Block theme comes with 4 widget areas:

  1. Content Bottom – this area will display on all content pages at the bottom
  2. Page Sidebar – this area will display on the right side of all pages
  3. Post Sidebar – this area will display on the right side of all posts
  4. Home Widgets – this area will display on your homepage if you have your homepage set to do so

None of the widgets are required to have, of course. The sidebars and content bottom areas will simply not be shown unless there are widgets added to them.

WPWB: Posts widget

Included in the WP Writer’s Block theme is a custom widget for displaying posts of various types and formats.

wpwb_posts_widgetTo use this widget, first drag it into the widget area you’d like to display so the settings form appears.

  1. Enter a “Title” for this widget. This will be displayed in the admin area. It will also be displayed on the widget if the Show Title box is checked. 
  2. You can select a “Post Format,” like Quote or Link, or leave this set to “- All -” to show posts of all format.
  3. You can also do the same with “Category.” Leave this set to “- All -” to show posts in all categories.
  4. “How many?” will limit the number of posts that is shown. Set this to -1 to show all posts (not a great idea if you have a lot of content in the system)
  5. The Show post data checkbox will hide or show the date and other information typically shown on post listings. The settings for what data is shown are found on the Text tab of the settings page.

 Next: Menus >