[wp-hackers] Ordering categories in permalinks
William Davis
will.davis at gmail.com
Fri Nov 5 23:29:17 UTC 2010
That will only half work, I think. WordPress will redirect you to what
it defines as the correct url. So you can link someone to http://new.bangordailynews.com/2010/10/25/business/lepages-cleared-in-florida-tax-case/
(even if it isn't in the business category, which is nice), but it
will redirect you to http://new.bangordailynews.com/2010/10/25/politics/lepages-cleared-in-florida-tax-case/
.
Will
On Nov 5, 2010, at 7:23 PM, Otto wrote:
> No. WordPress doesn't actually *use* the category in the permalink to
> retrieve posts, so you'd just need to modify the output of the
> get_permalink function. You could do this using the post_link filter,
> but you'd have to copy all the functionality of the get_permalink
> function to do it.
>
> -Otto
>
>
>
> On Fri, Nov 5, 2010 at 6:20 PM, William Davis <will.davis at gmail.com>
> wrote:
>> Awesome, just checking.
>>
>> So, back to the original question, which is exactly what hook do I
>> use to
>> modify the category order? Would that be post_rewrite_rules?
>>
>> Will
>>
>> On Nov 5, 2010, at 7:19 PM, Otto wrote:
>>
>>> On Fri, Nov 5, 2010 at 6:14 PM, William Davis <will.davis at gmail.com>
>>> wrote:
>>>>
>>>> We're actually not starting the permalink with the category (the
>>>> full
>>>> structure is /2010/10/25/politics/lepages-cleared-in-florida-tax-
>>>> case/).
>>>> I
>>>> saw this post a long time ago and kept that in mind.
>>>>
>>>> With the date in there, is it still considered harmful? My boss was
>>>> pretty
>>>> adamant about getting the category in there (it's a feature of
>>>> the old
>>>> CMS
>>>> that we use quite a bit).
>>>
>>> No. It's only when the first %whatever% bit is a non-numeric field
>>> that it's harmful.
>>>
>>> -Otto
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list