Tagged: categories, custom post type, custom taxonomy
- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by
Steve.
-
AuthorPosts
-
-
August 17, 2015 at 6:40 am #4216
vagelisMemberHi. I have created a custom post type with piklist and I’ve noticed that in the quick edit area the categories field is empty(I’ve inspected over it and all the
- are display:none). The custom taxonomies field below is showing fine. This happens only in the quick edit area. In the full edit screen they appear normally. The same field in post categories also is showing up normally in quick edit. Any ideas?
My post type code:
function yacht_post_types($post_types) { $post_types['yacht'] = array( 'labels' => piklist('post_type_labels', 'Yacht') ,'title' => __('Όνομα σκάφους') ,'menu_icon' => 'dashicons-sos' ,'capability_type' => 'post' ,'supports' => array( 'title' ,'revisions' ,'thumbnail' ,'editor' ) ,'public' => true ,'taxonomies' => array('category', 'manufacturers') ,'has_archive' => true ,'rewrite' => array( 'slug' => 'yacht' ) ,'edit_columns' => array( 'title' => __('Name') ,'post_states' => __('Status') ) ,'hide_meta_box' => array( 'slug' ,'author' ) ,'post_states' => true ); return $post_types; } add_filter('piklist_post_types', 'yacht_post_types'); function yacht_rewrite_flush() { // codex_yachts_init(); yacht_post_types(); flush_rewrite_rules(); } register_activation_hook( __FILE__, 'yacht_rewrite_flush' );Attachments:
You must be logged in to view attached files. - are display:none). The custom taxonomies field below is showing fine. This happens only in the quick edit area. In the full edit screen they appear normally. The same field in post categories also is showing up normally in quick edit. Any ideas?
-
August 17, 2015 at 9:52 am #4218
-
August 17, 2015 at 2:39 pm #4220
vagelisMemberThanx Steve. It was Polylang’s fault. All done.
I’ve noticed another strange thing with my post type. The title next to the “Add New” button is showing in singular and not plural (it’s Yacht and not Yachts as in default WordPress’Posts). Any ideas? -
August 17, 2015 at 3:27 pm #4221
SteveKeymasterShouldn’t it be singular? “Add New Yachts” is not correct.
You can also manually specify the labels if you like. Since Piklist does everything the WordPress way, you can pass the labels parameter, as defined in the WordPress codex.
Instead of:
'labels' => piklist('post_type_labels', 'Yacht')Use:
$labels = array( 'name' => __( 'Yachts'), 'singular_name' => __( 'Yacht'), etc... 'labels' => $labels
Does that make sense?
-
August 17, 2015 at 3:45 pm #4222
vagelisMemberYes!! Sorry for the fuss. Up and running. Thank you very much Steve.
-
August 17, 2015 at 3:53 pm #4223
SteveKeymasterGreat! Closing ticket.
-
-
AuthorPosts
- The topic ‘Categories field in quick edit not showing’ is closed to new replies.