WordPress.org

Ready to get started?Download WordPress

Forums

Drop down menu (3 posts)

  1. Traxis
    Member
    Posted 9 years ago #

    http://matthew.animeblogger.net/archives/2005/10/22/mahou_shoujo_lyrical_nanoha_as_4.php

    Look at the drop down menu at top, where you can select any posts from that category. I know he uses MovableType, but i want to do the same in WordPress, i saw it in some blogs. Can anyone help me? Is there an option or something to make a drop down menu like that? Someone told me to use this script:

    <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>

    But i didn't know where i had to put it :S Also i saw 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).
    Also, someone told me to use cg-samecat plugin, but i don't know how... ._.
    Thanks in advance!

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

  3. Traxis
    Member
    Posted 9 years ago #

    Yes, but thats for showing categories, no? I want to display all posts within a category in a drop down menu, and at the top of every post i write. Can you help me with that?
    Thanks for answering!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags