• Hi all,

    I’m running WP1.2.2 over at https://thinkdrastic.net.journal/

    Put simply, my category list is taking up far too much space in the sidebar. I’d like to put it into a select element – so the user can click “go” and be taken to the relevant category pages (kinda like its done in https://dooce.com/).

    Anybody know how I might go about doing that?

    TIA!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gnarly

    (@gnarly)

    OK, so I found a plugin at https://typedby.com/archives/2004/06/22/dropdown-plugin-with-ability-to-exclude/

    However, I’d rather not use a Javascriptdrop-down. Any further ideas?

    Thread Starter gnarly

    (@gnarly)

    Mental note: Look properly for answer before posting question…

    This is the code for the category drop-down:


    <form action="<?php echo $PHP_SELF ?>" method="get">
    <label for="cat"><?php _e('Subjects:'); ?></label><br />
    <?php dropdown_cats(1,'All Subjects','name','asc',0,1,1); ?>
    <input type="submit" name="submit" value="Go!" />
    </form>

    This is the code for the monthly archive dropdown:


    <form action="/journal/redirect.php" method="post">
    <label for="arch"><?php _e('Monthly Archives:'); ?></label><br />
    <select id="arch" name="arch">
    <?php get_archives('','','option', 1); ?>
    </select>
    <input type="submit" name="submit" value="Go!" />
    </form>

    And this is whats in the redirect.php referenced above:


    <?php
    $URL=$_POST['arch'];
    header ("Location: $URL");
    ?>

    Isn’t that lovely?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display the categories in a <select> element?’ is closed to new replies.