Jump to content

wp_dropdown_categories generating url ID number instead of slug


Recommended Posts

Hi all, this problem has me going nuts now.

in http://staging.tahititravel.com.au/package/

if you choose a category in the category filter box, the parent categories generate an ID number instead of the category slug in the URL. It's not SEO im worried about, it's that the WP_Query doesn't work if it doesnt generate a proper URL. So the box for sorting next to the category will not work.

The categories within the hierarchy works fine.

 

<form action="<?php bloginfo('url'); ?>/" method="get">
				<?php
                    $select = wp_dropdown_categories('show_option_all=Filter by Category...&exclude=1,31,21&show_count=1&hide_empty=1&depth=3&hierarchical=false&orderby=name&echo=0&selected=6&taxonomy=category');
                    $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
                    echo $select;
                    ?>
                    <noscript><input type="submit" value="View" /></noscript>
                    </form>

thanks

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.