[wp-hackers] Categories, Permalinks and wp_list_categories

Austin Matzko if.website at gmail.com
Thu Oct 15 13:34:55 UTC 2009


On Thu, Oct 15, 2009 at 8:17 AM, Lari Elovainio <lari at kairo.fi> wrote:
>
> On 15. 10. 2009, at 15.00, wp-hackers-request at lists.automattic.com wrote:
>
>> Would filtering the term list used for each taxonomy for
>> permalink-purposes suit you?
>> It'd be possible to filter out any cats you dont want to show in the
>> permalink, or alternatively, only return the term you want to show in the
>> permalink
>
> How would I do this? Will it fall back to use another category, if the one
> with the smallest ID is unwanted, or would I need to hard code a replacement
> category for every unwanted category (that would not do)?

You can modify the permalink with the 'post_link' filter.  That's
probably your best option with the current code, which does not allow
you to specify which category gets used for a permalink.


More information about the wp-hackers mailing list