Viewing 15 replies - 1 through 15 (of 16 total)
  • Went to your site but not only didn’t see the error, but also didn’t dee any category list.

    Thread Starter superjux

    (@superjux)

    Yeah I took it down because it doesn’t work.

    Well, I suspect it does work as I have used it before – just not the way you added it ??

    I am having the same problem, but only in Explorer, version 6.0. The drop dowm menu looks and works great in Safari and Firefox. Any ides? Here is the code for my sidebar:

    ‘ <div id=”sidebar”>

      <!– Author information is disabled per default. Uncomment and fill in your details if you want to use it.

    • <h2><?php _e(‘Author’); ?></h2>
      A little something about you, the author. Nothing lengthy, just an overview.
    • –>

      <h2>
      <?php wp_list_pages(‘title_li=’); ?>
      </h2>

      <!– WordPress Calendar is disabled per default. Remove the html comment tags if you want to use it.
      <li id=”calendar”>
      <?php get_calendar(2); ?>

      –>

    • <h2><?php _e(‘Archives’); ?></h2>
      <form id=”archiveform” action=””>
      <select name=”archive_chrono” onchange=”window.location =
      (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);”>
      <option value=”>Select month</option>
      <?php get_archives(‘monthly’,”,’option’); ?>
      </select>
      </form>
    • <h2><?php _e(‘Categories’); ?></h2>
      <form name=”catform” action=”<?php echo $PHP_SELF ?>”>
      <select name=”cat” onchange=”submit(this.form)”>
      <option value=”>Select category</option>
      <?php dropdown_cats(); ?>
      </select>
      </form>
    • <h2><?php _e(‘Previously’); ?></h2>
      <?php wp_get_archives(‘type=postbypost&limit=5’); ?>

    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) : ?>
    <?php get_links_list(); ?>

    • <h2><?php _e(‘Meta’); ?></h2>

    <?php endif; ?>

    • <h2>Search me</h2>
      <?php include (TEMPLATEPATH . ‘/searchform.php’); ?>

    </div>

    Try to put some parameters in this line
    <?php dropdown_cats(); ?>
    e.g. I am using
    <?php dropdown_cats('TRUE', '', 'name'); ?>
    (without parameters I also experienced the categories being displayed in the wrong place). Of course, you can set the parameters to your needs.

    Moshu-

    I tried that, but I’m still having the same problem. Everything looks great, as I said, in Firefox and Safari, but IE 6.0 is kicking my booty.

    Thread Starter superjux

    (@superjux)

    I think I’m having the same problem as Brittanie, because mine works fine in Firefox but does not work in IE as well.

    Anyone have any suggestions?

    Superjux-

    I got this to work using this code:

    <li><h2><?php _e('Categories'); ?></h2>
    <ul>
    <li>
    <form name="catform" action="/wordpress/index.php" method="get">
    <select name="cat" onchange="submit(this.form)">
    <option value=''>Select Category</option>
    <?php dropdown_cats(); ?>
    </select>
    </form>
    </li> </ul>
    </li>

    But I also had to edit my template-functions-category.php file to make the hack valid. Once I did, it solved the links outside of the box problem.

    Edit your template-functions-cat file to comment out lines 208 (echo “<select name=’cat’ class=’postform’>n’;)
    and line 227 (echo “/select>n”;)

    Thread Starter superjux

    (@superjux)

    That worked! Thanks!

    To comment out in php, you just add the two // to the start of the line.
    In wp 1.5.2, it’s actually line 201, which is this:
    echo "<select name='cat' class='postform'>n";
    so to comment that out:
    // echo "<select name='cat' class='postform'>n";

    and the other line is 220:
    echo "</select>n";
    make that
    // echo "</select>n";

    Thread Starter superjux

    (@superjux)

    Thanks so much Brittanie and Podz! It appears to have worked, but…is it possible to list the categories alphabetically instead of the random order they’re in?

    It should be possible, because I was able to exclude a category using the “hide” parameter. Try <?php dropdown_cats(‘sort_order=name’); ?> I’m going to test it on my site too.

    I, however, am still having issues with permalinks. You can select a category from the post meta data and be taken to:
    https://abroad-abroad.org/index.php/category/everyday/,
    but when you select the same category from the dropdown, it takes you to:
    https://abroad-abroad.org/index.php?cat=1.

    It’s the same exact page, but the category permalinks don’t work when you select from the drop-down.

    Thread Starter superjux

    (@superjux)

    I don’t get it…your permalinks work fine for me.

    Really? Try this – when you select a category from the sidebar’s drop-down menu, what address comes up in the browser? Can you post the address you’re getting here so I can see. Because the issue is that the drop-down menu takes you to the correct PAGE, but it doesn’t show the category name in the URL. It shows the category ID instead. If you select a category link from directly UNDER a post, the URL on the new page features the category “pretty” permalink, as it should. What is the point of having pretty permalinks if you are still seeing the cat ID as opposed to the cat name in the URL?

    Thread Starter superjux

    (@superjux)

    Ohhh, sorry, I misunderstood you. You’re right. That is kinda lame, and I just noticed it on mine now too.

    also, I tried that <?php dropdown_cats(‘sort_order=name’); ?> but it didn’t work.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘dropdown categories’ is closed to new replies.