[wp-testers] 3.1 Custom post types problems.
michael at mfields.org
michael at mfields.org
Mon Feb 28 02:50:21 UTC 2011
Hi Andrew,
I just installed your code on 3.1 via functions.php and it seems to be
working perfectly. I am able to publish new projects as well as edit
published projects from both wp-admin/edit.php and the admin menu.
I do not believe that there is a bug here.
Maybe try hooking a bit earlier?
add_action( 'init', 'custom_post_custom_init', 0 );
Best,
-Mike
> Still doesn't give me the edit option. Everything works and is updatable
> but don't have option to edit. Seems like some weird permissions issue or
> perhaps something that wasn't upgraded correctly (fresh 3.1 files though).
> Thanks for any ideas on whether this is a bug or not.
>
>
> AndrewJohnson
>
>
>
>
>
>
>
> On Feb 26, 2011, at 6:12 AM, R.Praveen Kumar wrote:
>
>> add_action('init', 'custom_post_custom_init');
>> function custom_post_custom_init()
>> {
>> $labels = array(
>> 'name' => _x('Project', 'post type general name'),
>> 'singular_name' => _x('Project', 'post type singular name'),
>> 'add_new' => _x('Add New', 'project'),
>> 'add_new_item' => __('Add New Project'),
>> 'edit_item' => __('Edit Project'),
>> 'new_item' => __('New Project'),
>> 'view_item' => __('View Project'),
>> 'search_items' => __('Search Projects'),
>> 'not_found' => __('No projects found'),
>> 'not_found_in_trash' => __('No projects found in Trash'),
>> 'parent_item_colon' => '',
>> 'menu_name' => 'Projects'
>> );
>> $args = array(
>> 'labels'=>$labels,
>> 'public' => true,
>> 'publicly_queryable' => true,
>> 'show_ui' => true,
>> 'show_in_menu' => true,
>> 'query_var' => true,
>> 'rewrite' => array('slug'=>'product'),
>> 'capability_type' => 'post',
>> 'hierarchical' => false,
>> 'menu_position'=>5,
>> 'taxonomies' => array('category', 'post_tag'),
>> 'supports' =>
>> array('title','editor','author','thumbnail','comments')
>> );
>> register_post_type('project',$args);
>> }
>> ?>
>
> _______________________________________________
> 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