Problem with a Custom Post Type
-
Hi,
I’ve created a custom post type on a wordpress 4.2.4 website with Polylang 1.7.8. The Polylang box appears on the “add new post” page, but when I save a new custom post, the language is not saved. So my new custom post doesn’t have any language associated. If I edit it, change to the second language, and save, now it works. But it’s not the easiest way to do it ??
Here the code of my CPT
add_action( 'init', 'custom_randonnee'); function custom_randonnee() { $labels = array(...); $args = array( 'label' => 'randos', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'thumbnail', ), 'taxonomies' => array( 'category' ), 'public' => true, 'menu_position' => 5, 'show_in_menu' => true, 'can_export' => true, 'has_archive' => true, 'capability_type' => 'post', 'map_meta_cap' => true, ); register_post_type( 'randos', $args ); }
Thanks for your help
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Problem with a Custom Post Type’ is closed to new replies.