[wp-trac] [WordPress Trac] #13490: Permalinks Issues for Custom Post Types with Parents
WordPress Trac
wp-trac at lists.automattic.com
Sun May 23 00:30:51 UTC 2010
#13490: Permalinks Issues for Custom Post Types with Parents
--------------------------+-------------------------------------------------
Reporter: mikeschinkel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Post Types | Version: 3.0
Severity: normal | Keywords: reporter-feedback
--------------------------+-------------------------------------------------
Comment(by mikeschinkel):
Here's a resolution for the duplicate slugs (but I wonder why I need to
set this because I defined my custom post types as `hierarchical`; maybe
this is something that needs to be done as the result of setting
`hierarchical=true` when calling `register_post_tye()`, or maybe not?):
{{{
add_filter('hierarchical_post_types','tyc_hierarchical_post_types');
function tyc_hierarchical_post_types($post_types) {
$post_types = array_merge(array('restaurant-menu','restaurant-
location'),$post_types);
return $post_types;
}
}}}
Of course now my `restaurant-dummy` parameters are showing how they are
not working for me because now my location pages are ignoring the
restaurant path segment and are loading all locations with the same name
regardless of the restaurant. But at least this will be an easy hack to
apply.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13490#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list