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.33   Updated Monday, July 6th, 2009 at 6:18pm

Drop-Down Post List Plugin for WordPress

This plugin allows you to easily display drop-down boxes containing the posts for specified categories (or all categories). You can use this plugin by entering the trigger text in a post or page, or by adding the function call directly to your theme files. You can display as many drop-down boxes as you like, and you have a choice between a standard select box (with button), or a ‘jump menu’ (as the visitor clicks on a post, they will immediately be taken to that page without having to click a button). Other options are also available.

Download

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

Demo

This is a generated drop-down post list, listing the posts of a particular category:

Topic: WordPress Plugins and Mods


Installation

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

Usage

There are two ways you can use this plugin.

Note: In both examples below, replace # with the category ID you want to list posts from, or use the word all to display posts from all categories.

1) In a post or page:

<!-- ddpl # -->
<!-- ddpl all -->

2) In a template file::

<?php echo ddpl_list(#); ?>
<?php echo ddpl_list('all'); ?>

Change Log

  • 07-09-09 Version 1.33 – Added method to display posts from all categories. Changed the way the WP version was being detected for calls to the database.
  • 02-17-09 Version 1.32 – Small change to produce valid xhtml when using more than one drop-down on a page
  • 08-12-08 Version 1.31 – Small change to produce valid xhtml
  • 09-27-07 Version 1.3 – Updated to work with WordPress 2.3. Added ‘Load Default Options’ button
  • 08-01-07 Version 1.2 – Option added to specify default option in list
  • 07-29-07 Version 1.1 – More options added
  • 07-28-07 Version 1.0 – First release

Modifications

The code this plugin generates is fairly plain (no special formatting), but to make customization easy, the form has been assigned a CSS class: ddpl-form

For example, if you would like to set the width of the select field, add this code to your theme’s style sheet:

form.ddpl-form select { width: 200px; }

Options

Here are the current options available (found under the DDPostList options page)

Form Type – You can choose to have the plugin generate a ‘jump menu’, or a traditional list with a submit button

Default Option – If entered, this is the first option that will show up in the list (does not link to anything)

Button Text – If using a traditional list, this is the button text

Sorting Method – You can choose to sort by post date (ascending or descending), or post title

Post Limit – This allows you to define a limit for the number of posts in the list (0 for no limit)

Add Before Form – Code added here will be displayed before the generated form

Add After Form – Code added here will be displayed after the generated form

Add Before List – Code added here will be displayed before the list

Add After List – Code added here will be displayed after the list

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

  1. 75
    Trish

    Does anyone know how I can make it work with all categories instead of defining a specific category?

  2. AWESOMELY easy add-in – THANKS !

    But I cant seem to get it to sort alphabetically (by title).

    No matter how many times I go into the options, it doesnt seem to retain it. Any ideas or dependencies?

  3. How can i show ALL category? Developer please response. Thanks

  4. I just installed this, but I don’t see a DDPostList options page. Did I miss something?

  5. Hey there, thank you very much for the plugin!
    There is one question though:
    I’m using more than one dropdownmenu, and I need the Default Option to be the Category name. how could i manage the Default Option for each dropdownmenu i use separatly?

  6. Allison: The option allows you to specify a category ID – not a user ID. I will keep it in mind for a future update though.

  7. Apparently the plugin will not work by using the ID associated with the user, ergo: Admin (1)

    If this were possible, we could make use of this plugin, but unfortunately without this functionality we must keep searching.

    If however you could either revise the plugin to work with User ID numbers while remaining in a pulldown menu, we would be happy to supply an ad spot for you on SmArgus for 2 months.

  8. Update: The plugin also does not work within an existing table.

  9. February 23rd, 2009

    Hello, this is just what we have been searching for on our multiple contributor bog. Thank you for taking the time to make this plugin.

    However, when we plug in the ID numbers for administrator level accounts it does not work. This presents a problem as both admin accounts are also contributors.

    Is there perhaps a workaround for this?

    Cordially,

    Allison Bricker

  10. Rick: Unpacking the plugin package? The plugin is just a single file you rename to PHP then upload. I do not believe that the error you mentioned could be caused by the plugin itself. There are no archives involved.

  11. 65
    Rick

    WP 2.71 – Thesis 1.4.2

    Unpacking the plugin package

    Incompatible archive: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

    Installation Failed

  12. Version 1.32 Released

    This version fixes a html validity error when more than one drop-down is used on the same page.

  13. I know you state that this plugin validates but I’m finding that it doesn’t. My site is XHTML 1.0 Strict and the DDPL is the only thing stopping me from being valid. I love this plugin so I’m hoping you’ll be updating it SOON!!! PLEASE!

  14. Thanks.. just what we needed. You can see your plugging in action here: http://www.radioinox.com

  15. Why we cannot add more than one category? Can we put this option?

Pages: « 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.