[wp-testers] Permalinks for custom post types

Dion Hulse (dd32) wordpress at dd32.id.au
Tue Mar 23 20:28:39 UTC 2010


On Wed, 24 Mar 2010 00:49:55 +1200, Clement Nicolaescu  
<clementnicolaescu at gmail.com> wrote:
> Hello ,
> My custom posts types are not working when it comes to use permalinks.
> register_post_type('slider', array(
> 'label' => __('Sliders'),
> 'singular_label' => __('Slider'),
>  'public' => true,
> 'show_ui' => true,
> 'inherit_type' => 'post',
>  '_builtin' => true,
> '_edit_link' => 'post.php?post=%d',
>  'capability_type' => 'post',
> 'hierarchical' => false,
>  'rewrite' => true,
> 'query_var' => false,
> 'supports' => array('title', 'editor', 'custom-fields')
> ));


Remove the _builtin note, thats for internal post_Types only.
Remove the _edit_link item, thats the wrong link (The default will create  
it properly for you)
Remove the query_var = false, It'll default to the post_type name, and as  
false, will not work correctly anyway.


Dion Hulse / dd32
Contact:
  e: contact at dd32.id.au
  Web: http://dd32.id.au/


More information about the wp-testers mailing list