• Just upgraded to 3.2.1 and now my categories sidebar widget doesn’t resolve to pretty link url, but just to the ugly link such as /?cat=39.

    If I click on a “Posted In: category” link it resolves to the pretty link, but not from the sidebar category dropdown widget. I think this used to work fine until the upgrade unless I never noticed it until now.

    Here is the php for the Categories dropdown from my sidebar.php
    <?php wp_list_cats(‘sort_column=name&optioncount=1&hierarchical=0’); ?>

    You can see the blog at http://wp.me/QGp1

    Any help would be appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Eleven theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    Thread Starter asdfqwer

    (@asdfqwer)

    Thanks. I’d done all that except resetting plugins folder, and just tried that, but the problem remains.

    looking at the source code of any page on my blog, the relevant script is

    <script type='text/javascript'>
    /* <![CDATA[ */
    	var dropdown = document.getElementById("cat");
    	function onCatChange() {
    		if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
    			location.href = "http://www.gregdorter.com/toronto-therapist-blog/<strong>?cat="+dropdown.options[dropdown.selectedIndex].value</strong>;
    		}
    	}
    	dropdown.onchange = onCatChange;
    /* ]]> */
    </script>

    But I don’t know where I can change that.

    I noticed I was using wp_list_cats in sidebar.php and that wp_list_cats is depreciated, but changed it to the wp_list_categories and no difference.

    Thread Starter asdfqwer

    (@asdfqwer)

    So I guess there’s nothing I can do?

    asdfqwer

    I see you fixed the your problem! How did you do it? I’m having the same issue with wp_dropdown_categories. WordPress doesn’t redirect to the pretty link, the url is just ?cat=31..
    PS: this is a custom theme in progress running on my pc. Tried the TwentyEleven theme, same issue

    Here is the snippet I use:

    <form action="<?php bloginfo('url'); ?>/" method="get">
    	<div>
    		<?php
    			$select = wp_dropdown_categories('show_option_none=Select Category&orderby=name&echo=0&hide_empty=0&hierarchical=1');
    			$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
    			echo $select;
    		?>
    		<noscript><div><input type="submit" value="View" /></div></noscript>
    	</div>
    </form>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Catergories Sidebar Dropdown Not Resolving to Pretty Links’ is closed to new replies.