Viewing 5 replies - 1 through 5 (of 5 total)
  • Simple – use this code:

    <script language=”JavaScript” type=”text/JavaScript”>
    <!–
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
    eval(targ+”.location='”+selObj.options[selObj.selectedIndex].value+”‘”);
    if (restore) selObj.selectedIndex=0;
    }
    //–>
    </script>

    <select name=”category” onchange=”MM_jumpMenu(‘parent’,this,0)”>
    <option value=””>Other entries in my site…</option>

    <option value=””>———————————–</option>
    <?php query_posts(‘category_name=YOURCATEGORYNAME&showposts=4’); ?>
    <?php while (have_posts()) : the_post(); ?>
    <option value=”<?php the_permalink(); ?>”><?php the_title(); ?></option>
    <?php endwhile; ?>
    </select>

    Thread Starter traxis

    (@traxis)

    Thanks! But, where i have to put it? :S Also i see i must specify a category, but can i make it “dynamic” so depending on the category of the post, it show only posts from that category? (exactly like the site before mentioned) I need too the drop down menu appears in every post i visit by clicking on the post title (like that site).

    Thread Starter traxis

    (@traxis)

    Someone told me to use cg-samecat plugin (which i can’t find ‘cuz the author page its off-line), and modify something inside it, and then use also a javascript menu like the one boing posted. Can someone help me with that? Please ??

    Thanks in advance!

    Thread Starter traxis

    (@traxis)

    Can anyone help me? I don’t know what to do ._.

    This code works nicely in an archive Page, and probably in other Pages, too.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Drop down posts from a category’ is closed to new replies.