Support » Fixing WordPress » Pull Down Menu of Recent Posts from a Category

  • I’d like to display the most recent posts from a selected category in a pull down menu. I’ve been studying the codex/forums and have had some luck displaying categories or monthly archives in a pull down menu but not so much for recent posts from a selected category.

    Any help would be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you achieving this category drop-down with a plug-in at present? If so, you could modify it slightly. I am not aware of any existing plug-ins that do this, but what you want is probably something like the following.

    In the header:

    <script type="text/javascript">

    function formHandler(form){
    var URL =[].value;
    window.location.href = URL;


    In the body:

    <form name="form">
    <select name="site" size=1 onChange="javascript:formHandler()">
    <option value="Get_item_1_url()">Get_item_1_title()
    <option value="Get_item_1_url()">Get_item_2_title()


    where item_1 is the most recent one. I don’t know the WordPress API quite so well, but you can have a look at the WordPress Codex. Maybe somebody else in the forum can complete this. Hope it helps…

    I’m sure he’s using the template tag Template_Tags/dropdown_cats. I wonder if a modified loop using query_posts would do it.

    For the categoriese pull down menu I’m using this plugin.

    For montly archives I’m using this code, which I got from the forums:

    <form id="archiveform" action="">
    <select name="archive_chrono" onchange="window.location =
    <option value=''>Select Month</option>
    <?php get_archives('monthly','','option'); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pull Down Menu of Recent Posts from a Category’ is closed to new replies.