[wp-hackers] Custom post type & hierarchical
dan at dansmart.co.uk
Sun Aug 22 13:44:51 UTC 2010
I've tried flushing the rules, and no luck on my hierarchical taxonomy.
Lox, I don't know if you found it a successful fix?
Dan Smart - Freelance Web Developer
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Michael Clark
Sent: 22 August 2010 12:40
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Custom post type & hierarchical
Good morning everyone,
Looking through trac I found that when you set up a hierarchical
custom_post_type, you have to flush the rewrite rules. From
"After registering a post type, you need to flush the rewrite rules
in order for the new rules to take effect, This is probably whats
caught you, you've set it up first without the hierarchical flag set,
then changed it, which has enabled the UI, but the rules are still
only for non-hierarchical."
I added this code to the bottom of my function create_my_post_types()
and all is good now.
Many thanks for your help. Mike
At 8:19 AM +0100 8/22/10, Dan Smart wrote:
>Just to confirm, I have the same issue on WP3.0.1, was going to
>enquire about that too.
>Mind you, the rewrite rules for custom taxonomies don't seem to be
>completely implemented by WP yet, so I assumed this was another
>Dan Smart - Web Developer
>On 22 Aug 2010, at 00:17, Michael
>Clark<dc153464a11bcf5aeb18180db28017fb.wp-hackers at planetmike.com>
>> At 1:49 AM +0300 8/22/10, scribu wrote:
>>> On Sun, Aug 22, 2010 at 1:39 AM, Michael Clark <
>>> -> wrote:
>>>> I've added a new "Show" of "1998 Season". Then I added in a show that
>>>> in that season. You Can't Take it With You. In the admin area:
>>>> http://www.example.com/wp-admin/edit.php?post_type=shows I see the
>>>> the hierarchy correctly. But when I click on the View link under the
>>>> I get a 404 error. If I remove 1998-season from the URL, the page
>>>> just fine. Is this a WordPress bug, or have I done something
>>>> along the way? Searching the Codex, WP forums and Google isn't turning
>>>> anything useful.
>>> Maybe it's because the slug begins with a number. Try changing it to
>> Nice guess, but that did not affect anything.
>> BTW, WP 3.0.1
>> Michael Clark
>> Christmas Music 24 Hours a Day, 7 Days a week
>> "Injustice anywhere is a threat to justice everywhere."
>> - Martin Luther King Jr.
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>wp-hackers mailing list
>wp-hackers at lists.automattic.com
Christmas Music 24 Hours a Day, 7 Days a week
"Injustice anywhere is a threat to justice everywhere."
- Martin Luther King Jr.
wp-hackers mailing list
wp-hackers at lists.automattic.com
More information about the wp-hackers