[wp-testers] Custom Post Types Are Not Added To Menu editor?

Paul Robinson pablorobinson at gmail.com
Thu Apr 1 10:26:29 UTC 2010


Turned out it was because (for some reason) it was automatically
turned off in the Screen Options. I'm now going to hit myself for not
checking that in the first place.

Thanks for the help Dion & Christian. Oh and I know it's early yet,
but is there any projected release for 3.0 yet? I'd heard May?

Paul.

On 1 April 2010 11:21, Paul Robinson <pablorobinson at gmail.com> wrote:
> Hi again,
>
> So I altered the code. It didn't seem to make any difference on my
> sisters install, so I copied the code & pasted into my test install &
> it works fine for me, I get both 'add an existing LMA post' & add an
> existing LMD post' in my menu editor, but my sister doesn't (she only
> sees the LMD one). This is the code we are both using.
>
> function post_type_lma() {
>         register_post_type('lma', array('label' => __('LMA posts'),
> 'singular_label' => __('LMA post'), 'public' => TRUE, 'show_ui' =>
> TRUE, 'inherit_type' => 'post', 'capability_type' => 'post',
> 'hierarchical' => FALSE, 'rewrite' => array('slug' => 'lisamarieart'),
> 'supports' => array('title', 'editor', 'author')));
>         register_taxonomy('product_type_lma', 'lma',
> array('hierarchical' => TRUE, 'label' => __('Product Type
> LisaMarieArt'), 'query_var' => 'lma_product_type', 'rewrite' =>
> array('slug' => 'lisamarieart-products')));
>     }
>     add_action('init', 'post_type_lma');
>
> //Add custom Post Type for LisaMarieDesign Zazzle
>     function post_type_lmd() {
>         register_post_type('lmd', array('label' => __('LMD posts'),
> 'singular_label' => __('LMD post'), 'public' => TRUE, 'show_ui' =>
> TRUE, 'inherit_type' => 'post', 'capability_type' => 'post',
> 'hierarchical' => FALSE, 'rewrite' => array('slug' =>
> 'lisamariedesign'), 'supports' => array('title', 'editor',
> 'author')));
>         register_taxonomy('product_type_lmd', 'lmd',
> array('hierarchical' => TRUE, 'label' => __('Product Type
> LisaMarieDesign'), 'query_var' => 'lmd_product_type', 'rewrite' =>
> array('slug' => 'lisamariedesign-products')));
>     }
>     add_action('init', 'post_type_lmd');
>
> Any ideas, it's really got me stuck?
>
> Thanks again.
>
> On 1 April 2010 10:56, Paul Robinson <pablorobinson at gmail.com> wrote:
>> Hi Dion,
>>
>> Just noticed that singular_label didn't have quotes around it.
>> *facepalms* I'll get them added & try again.
>>
>> Yes, she can create posts both in normal posts & custom post types.
>> I'll see if adding the quotes helps & get back to you.
>>
>> Thanks, I think I need my coffee, lol.
>>
>> On 1 April 2010 09:52, Dion Hulse (dd32) <wordpress at dd32.id.au> wrote:
>>> That exact code (well 'sungular_label' with quotes instead of just plain)
>>> works for me.
>>> Does the user she's logged in have the ability to create posts? Perhaps try
>>> creating a new administrator account and seeing if that has access?
>>>
>>> On Thu, 01 Apr 2010 02:58:06 +1200, Paul Robinson <pablorobinson at gmail.com>
>>> wrote:
>>>
>>>> Hi guys,
>>>>
>>>> So my sister is currently mocking up her new site & wanted to try out
>>>> the new custom post types. She has used the following code to add a
>>>> post type:
>>>>
>>>> //Add custom Post Type for LisaMarieDesign Zazzle
>>>>     function post_type_lmd() {
>>>>         register_post_type('lmd', array('label' => __('LMD posts'),
>>>> singular_label => __('LMD post'), 'public' => TRUE, 'show_ui' => TRUE,
>>>> 'inherit_type' => 'post', 'capability_type' => 'post', 'hierarchical'
>>>> => FALSE, 'rewrite' => array('slug' => 'lisamariedesign'), 'supports'
>>>> => array('title', 'editor', 'author')));
>>>>         register_taxonomy('product_type_lmd', 'lmd',
>>>> array('hierarchical' => TRUE, 'label' => __('Product Type
>>>> LisaMarieDesign'), 'query_var' => 'lmd_product_type', 'rewrite' =>
>>>> array('slug' => 'lisamariedesign-products')));
>>>>     }
>>>>     add_action('init', 'post_type_lmd');
>>>>
>>>> She has two, that one and another identical one (except the ids &
>>>> labels are different). Both taxonomies are linkable via the new menu
>>>> editor, but there is another box to allow you to add links to posts
>>>> from the post type defined above, but not one for the second post
>>>> type. Can anyone help with what's going on? I thought I'd better post
>>>> it here as it seems like it might be a bug.
>>>>
>>>> On a side note I thought that posts were not linkable via the menu
>>>> system and that only posts & categories were linkable.
>>>>
>>>> Thanks for any help & the custom posts system is looking awesome so far.
>>>> :)
>>>>
>>>> Paul.
>>>> _______________________________________________
>>>> wp-testers mailing list
>>>> wp-testers at lists.automattic.com
>>>> http://lists.automattic.com/mailman/listinfo/wp-testers
>>>>
>>>
>>>
>>> --
>>> Dion Hulse / dd32
>>> Contact:
>>>  e: contact at dd32.id.au
>>>  Web: http://dd32.id.au/
>>> _______________________________________________
>>> wp-testers mailing list
>>> wp-testers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-testers
>>>
>>
>


More information about the wp-testers mailing list