Ready to get started?Download WordPress


Drop down menu (3 posts)

  1. Traxis
    Posted 9 years ago #


    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
    if (restore) selObj.selectedIndex=0;

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

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