Customizable Post Listings


The Customizable Post Listings plugin allows you to add quick lists of recent posts, recently commented posts, recently modified posts, and random posts, as well as other post listings your sidebar. In this example, we show you how to add a list of recent posts (Figure 56).

Figure 56. In this example, we used Customizable Post Listings to show the three most recent posts in the sidebar.


Customizable Post Listings was written by Scott Reilly of Coffee2Code. It can be found at www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings.

Tip

  • To learn how to add other listings with Customizable Post Listings, consult the documentation on its Web page. That's where you'll find code examples and plugin support.


To install Customizable Post Listings

Follow the instructions earlier in this chapter and on the Customizable Post Listings Web page to install and activate the plugin.

To use Customizable Post Listings

1.

Use your favorite text editor to open the sidebar.php file for your theme.

2.

Insert the following code where you want the recent post listing to appear (Figure 57):

<li><h2>Recent Posts</h2> <ul><?php c2c_get_recent_posts(3); ?></ul></li>


Figure 57. Insert code into your sidebar.php file.


3.

View your blog. The sidebar should display dates and titles for the three most recent posts (Figure 56).




WordPress 2. Visual QuickStart Guide
WordPress 2
ISBN: 0321450191
EAN: 2147483647
Year: 2004
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net