Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.1   Updated Sunday, February 22nd, 2009 at 2:14pm

Recent Categories Plugin for WordPress

This plugin generates a simple list of the most recently created categories in your WordPress installation. You can specify the number of categories listed, and the titles link to the category archives. This plugin can be called from a post or page, or directly from a template file. You can also choose to show the date the category was created.

Download

  If you have found this page useful, please consider donating. Thanks!

Instructions

  • Download the above file, rename it from .txt to .php, and upload it to your plugins directory.
  • Enable the plugin.
  • Configure the plugin options (under DDRecentCats).

Change Log

  • 02-22-09 Version 1.1 – Added options page. Can now choose to display date of category creation, and format the date display.
  • 08-28-08 Version 1.0 – First release.

Usage

There are two ways you can use this plugin. With both methods, ‘X’ is the number of categories you would like to display. They will be sorted with the most recent first.

1) In a post or page, insert the following line:

<!-- recentcats X -->

2) In a template file, insert the following code:

<?php echo dd_recent_cats(X); ?>

Important: If you use the first method, make sure you add this using the html/code editor in WordPress, not the visual editor. In new versions of WordPress, just click the ‘html’ button above the edit box. If you use the visual editor it will not work, as the actual code you entered will be seen on the page, instead of being processed by the script.

Options

Here are the options available in this plugin’s options page in the WordPress admin panel.

Show Date

If enabled, the creation date will be shown next to each category. Since WordPress does not store the actual date a category is created, the value used is the date of the earliest published post in that category.

Date Format

If showing the date, it can be customized using this option, which follows the standard PHP date format structure.

Customization

This plugin generates a standard html list. If you would like text above or below the list, you can add it to your post or page, or directly into the template file you call the function from.

Additionally, the CSS class ddrc is given to the <UL>

<ul class="ddrc">
<li>..cat link..</li>
<li>..cat link..</li>
<li>..cat link..</li>
</ul>

You can use this to customize the list display in your theme’s CSS file.

Pages: [11] 10 9 8 7 6 5 4 3 2 1 » Show All

  1. I’m waiting for your more smart advice in future.

  2. You happen to be really a outstanding site owner. The web page filling swiftness is wonderful. It seems that you are carrying out just about any one of a kind key. Moreover, Your belongings usually are masterwork. you’ve got done an awesome exercise with this subject matter!

  3. thankss… endustriyel firin

  4. Nice post bro!

  5. please read through the comments because most common issues have already been discussed many times. Thanks
    pastane ekipmanlar?kahve makinesiendüstriyel buzdolab?endüstriyel bardak y?kama makinesisanayi tipi y?kama makinesi

  6. nice post bro!
    oto cam, sineklik

  7. nice post bro!

  8. please read through the comments because most common issues have already been discussed many times. Thanks.qq player | avira | photoscape \ video edit magic | download recuva | recuva | audio recorder
    driver pack | fun face master \ photography video games | winrar | super copier | nero
    avant browser | teamviewer | gom player \ sound chapter music | skype | download avs audio recorder | netcut

Pages: [11] 10 9 8 7 6 5 4 3 2 1 » Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.