New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using and customizing built-in widgets

From: WordPress: Creating Custom Widgets and Plugins with PHP

Video: Using and customizing built-in widgets

WordPress has some built-in widgets that can be installed with little or no programming at all. Some allow for using data that's in WordPress, like Archive posts, the blogroll or Pages. Others allow you to add HTML and JavaScript snippets, or even use RSS feeds from other blogs and other web sites. Let's go to the WordPress Widget panel. It's located under the Appearance menu, and you can see here we have our available widgets, inactive widgets, and then we have all of our different widget areas based on our theme.

Using and customizing built-in widgets

WordPress has some built-in widgets that can be installed with little or no programming at all. Some allow for using data that's in WordPress, like Archive posts, the blogroll or Pages. Others allow you to add HTML and JavaScript snippets, or even use RSS feeds from other blogs and other web sites. Let's go to the WordPress Widget panel. It's located under the Appearance menu, and you can see here we have our available widgets, inactive widgets, and then we have all of our different widget areas based on our theme.

If we want to add new widgets to our theme, we can simply drag them from here over to there. For example, I want to add some links so I can just grab the Links widget, and it appears over here with all the options that are editable. These, by the way, are all the widgets that are available in the WordPress 3.0 installation. If you have plugins, you may see more. If you want to customize anything in your Links widget, you can go and do that here and click Save. To view it on the front-end, simply open the web site, scroll down, and you can see it's added, with this title of Blogroll.

To remove widgets, there's two ways you can do it. One way is you can grab it and drag it over into the Available Widgets page, which will essentially just remove it forever. The other way is you can drag it into the Inactive Widgets, which will save the settings but remove it from the web site. In the case of links, we were just playing around, so we are just going to remove that entirely. You may have seen how some web sites have their Facebook information or have some kind of plugins from social media web sites. The way they do that is they use the built-in text widget.

So I am going to drag that over here. I am going to open it up, and I am going to use this to display my Facebook widget. So I will just put 'My Facebook page,' and then I will go up to the Badges page of Facebook, and you can see it gives you some different types that are specifically made for those types of blogs. In this case, we can just copy the text and paste it right into our text widget, save it, go back to our web site, refresh it, and you can see it adds my Facebook widget.

So let's go ahead and take our Facebook widget, and let's put it in Inactive Widgets in case we want to bring it back. This will save all the settings for us. And then we are going to grab an RSS widget, so that we can plug a feed into our web site. I like this Gizmodo feed from gawker.com, so I am going to copy the feed URL, paste it in here, and just call it Gizmodo. I am only going to display five items; ten items seems a little extraneous. Save it.

I am back at my web site. You can see it now adds Gizmodo, and you can click any of these, and it will bring you to that web site. So WordPress has a number of built-in widgets that allow you to do a lot of customization without any programming knowledge. We looked at how to create these to use site information like the Blogroll. You can also do things with pages and posts. We also look at how to do widgets that come from other sites using the plain text widget or the RSS Feed widget.

Show transcript

This video is part of

Image for WordPress: Creating Custom Widgets and Plugins with PHP
 
Expand all | Collapse all
  1. 1m 49s
    1. Welcome
      1m 16s
    2. Using the exercise files
      33s
  2. 23m 29s
    1. WordPress overview
      2m 32s
    2. Installing WPI for Windows
      3m 42s
    3. Installing MAMP for the Mac
      3m 25s
    4. Installing and configuring WordPress
      5m 51s
    5. Comparing WordPress 3.0 with previous versions
      2m 57s
    6. Setting up a PHP/WordPress development environment
      5m 2s
  3. 14m 47s
    1. Exploring WordPress plugins
      3m 42s
    2. Administering plugins from the WordPress admin
      5m 23s
    3. Exploring where plugins reside
      2m 51s
    4. Introduction to hooks
      2m 51s
  4. 39m 28s
    1. Creating the plugin PHP file(s)
      3m 12s
    2. More on hooks: Actions and filters
      3m 15s
    3. Installation and activation
      4m 6s
    4. Writing activation code
      3m 45s
    5. Writing an action
      5m 12s
    6. Writing a filter
      4m 15s
    7. About pluggable functions
      2m 1s
    8. Writing a pluggable function
      5m 30s
    9. Using template tags
      2m 46s
    10. Introducing shortcode
      5m 26s
  5. 26m 2s
    1. Widgets and the WordPress Widgets SubPanel
      2m 54s
    2. Comparing widgets and plugins
      1m 8s
    3. Using and customizing built-in widgets
      3m 18s
    4. Creating a new widget
      7m 21s
    5. Writing the constructor and registering widgets
      5m 20s
    6. Enabling configuration of widgets
      6m 1s
  6. 44m 59s
    1. Creating an admin interface
      5m 25s
    2. Saving data to the database
      5m 39s
    3. Securing form submission with nonces
      2m 25s
    4. Options editing post-WordPress 2.7
      4m 8s
    5. Integrating with the WordPress admin menus
      3m 34s
    6. WordPress admin dashboard API
      4m 5s
    7. Using existing options and option editing pages in WordPress
      5m 19s
    8. Using jQuery and AJAX for administration
      14m 24s
  7. 27m 13s
    1. Accessing the WordPress database
      5m 45s
    2. Using the built-in schema
      2m 21s
    3. Accessing data using $wpdb
      5m 15s
    4. Creating new tables
      7m 18s
    5. Inserting data
      6m 34s
  8. 26m 27s
    1. Introducing the Loop
      6m 22s
    2. Using WP_Query()
      3m 11s
    3. Custom filtering and sticky posts
      4m 58s
    4. Using jQuery and AJAX for posts and pages
      11m 56s
  9. 12m 9s
    1. Registering and promoting plugins
      2m 28s
    2. Creating an uninstall function
      5m 53s
    3. Backward compatibility issues
      3m 48s
  10. 15m 3s
    1. Understanding security issues
      11m 20s
    2. Internationalizing your plugin
      3m 43s
  11. 18s
    1. Goodbye
      18s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.