• What kind of code do I need to enter into index.php to get a dropdown archives menu instead of a list? I’ve been looking around and seen a few possibilities. 2fargon raised a question some time ago about some index.php code that would also involve javascript.

Viewing 14 replies - 16 through 29 (of 29 total)
  • thanks macmanx… works like a charm.

    How can I modify that so it fits my theme better?

    How can I “toggle” between the Theme Manji and LetterHead?
    Right now I can go from LetterHead to Manji, Rin, Classic
    but I can’t go back using theme-switcher. Thanks

    Hello. I am looking for the above, code to create a drop-down menu for categories and archives. In a previous MT-installation, I was able to do create this without any weeping or gnashing of teeth.

    In the above replies, Carthik posted a few lines of code to create a drop-down menu for archives, and was followed by podz, who posted a few lines of code to create a drop-down menu for categories.

    My problem is that I am not a coder or programmer or hacker – I don’t know php. I know how to edit the WP files, etc., but I do not know where I am to paste the above code so that my archives (and then categories) will appear in drop-down menus as opposed to ever-increasing lists.

    My request is, would someone kindly explain to me what I am to do and where I am to post the above code? Also, the same for the above category code.

    Thanks kindly, anyone and everyone.
    – Randy

    To remove the “1” just replace 1 with ” in the code.. ie:

    <h2>Archives</h2>

    <form name=”archiveform” action=””>
    <select name=”archive_chrono” onchange=”window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);”>
    <option value=”>Monthly Records</option>
    <?php get_archives(”,”,’option’, ”); ?>
    </select>
    </form>

    I was able to succesfully get the categories drop down working with out problem. But, I have many subcategories, and when they were all listed, each subcategory would be aligned a little towards the right under its parent. How can i do this in the drop down menu. You can see both at https://www.mechietechie.com

    EDIT* Shoot, you wanted the archive’s one, well..I’m not fully awake yet. I’ll post it in as a new reply lmao.. <slaps self> wake up spencerp, wake up gerd damn it!!

    Here’s one that it’s my dev theme, I’m not sure if I’m going to keep it or not though..

    Don’t mind the <tr> <td>‘s and stuff..

    <tr>
    <td align="left" width="117">
    <select name='cat' class='postform'>
    <option value='0'>By Categories</option>
    <option value="1">Uncategorized</option>

    <option value="2">General</option>

    </select>
    </td>

    <td align="left" width="25"><input type="image" src="https://localhost/boxed/wp-content/themes/AO8r/img/go.jpg" border="0" id="searchsubmit" value="Search" /></td>
    </tr>

    The value "1" and such are the “catagory ids” from the Catagory manager in control panel.. This seems to be working just fine for me for testing.. I hope this help maybe..

    spencerp

    value='0' isn’t one for choosing, so it just displays:By Categories when page is refreshed and loaded and such..

    Here it is, and I think it’s like the ones above though. But anyways, just thought I’d post it though.. =P

    <form name="archiveform" id="archiveform" action="">
    <table cellspacing="2" cellpadding="0" border="0" width="142">
    <tr>
    <td align="left" width="117"><select style="width: 117px;" name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);">
    <option value=''>By Month</option>
    <option value='https://localhost/boxed/?m=200605'> May 2006 </option>
    <option value='https://localhost/boxed/?m=200604'> April 2006 </option>

    <option value='https://localhost/boxed/?m=200603'> March 2006 </option>
    <option value='https://localhost/boxed/?m=200602'> February 2006 </option>
    <option value='https://localhost/boxed/?m=200601'> January 2006 </option>
    </select>
    </td>
    <td align="left" width="25"><input type="image" src="https://localhost/boxed/wp-content/themes/AO8r/img/go.jpg" border="0" id="searchsubmit" value="Search" /></td>
    </tr>

    </table>
    </form>

    I hope this helps, but like I said, I think this was already basically posted above..dang..wake up spencerp, wake up!!

    Here’s some screen shots.. The first is both of the “selectors” closed, second one is the Archive “selector open”.

    https://www.vindictivebastard.net/images2/selectors-closed.gif

    https://www.vindictivebastard.net/images2/selector-open.gif

    spencerp

    That works, and really I don’t think you’d need a “Go” button, because when I choose a month, it automatically takes me to the page with that content for that month in it already.. without clicking the button..but who knows..

    I’d like to make a similar dropdown menu for wp_list_authors. Can anyone please help me on this? Thanks

    Can anyone point me into the right direction on how to create a dropdown menu for authors? Any help will be much appreciated. Thanks ??

    Is there an implementation that doesn’t require the VIEW button but simply jumps to the correct page selected in the dropdown menu?

    Hi Guys,

    Thanks for all the great information. After searching for long time, finally this dropdown archives menu thread help me solve the problem ??

    I especially want to thanks Spencerp, he always give his time and help others — Thank You Spencerp!

    Cheers
    Ann

    Awww, thanks for your kind words Ann. =) It was no trouble at all.. ?? I knew I had that thread in my past history there some where lol! Glad it worked for you! =)

    spencerp

    Aaron asked… “Is there an implementation that doesn’t require the VIEW button but simply jumps to the correct page selected in the dropdown menu?” I’m interested in the same thing. Can anyone help?

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘archives dropdown menu’ is closed to new replies.