Chapter 3. Live Blogroll

We learned how to set up a fully functional WordPress plugin, and use WordPress hooks to insert our code exactly when we want it.

In this chapter, we will move on and explore more cool things we can do with WordPress by livening up the default WordPress Blogroll.

The purpose of the plugin will be to display the most recent posts from the sites listed in the blogroll using a nice pop-up window. We also want to do that dynamically, using Ajax and jQuery technologies.

Do not worry if you know little about them right now. They integrate naturally with WordPress, and soon you'll consider them as being part of WordPress!

In this chapter, you will:

  • Use more hooks, more API features
  • Deal with RSS, an important aspect of blogging
  • Get familiar with jQuery and Ajax, and load the 'recent posts' dynamically
  • Learn how to make the plugin secure by using nonces

You will learn this by:

  • Creating a live Blogroll plugin that adds a 'recent posts' pop up for each blog in your blogroll

The integrated WordPress Blogroll is very rudimentary one; it just displays a list of links that stay exactly the same over time. Here is what it normally looks like:

Live Blogroll

What if it could give us an insight into what is happening on the site by showing the most recent posts?

Our plugin makes this functionality possible, is attractive to use, and will not slow down the loading time of the main page. We will call the plugin 'Live Blogroll' as this is what it will actually do—breathe life into our blogroll!

Live Blogroll