Title: Problem with a Custom Post Type
Last modified: August 30, 2016

---

# Problem with a Custom Post Type

 *  Resolved [gotfers](https://wordpress.org/support/users/gotfers/)
 * (@gotfers)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/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
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [gotfers](https://wordpress.org/support/users/gotfers/)
 * (@gotfers)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-a-custom-post-type/#post-6399868)
 * I have to add that all solutions found on the support don’t work…
    Thanks
 *  Thread Starter [gotfers](https://wordpress.org/support/users/gotfers/)
 * (@gotfers)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-a-custom-post-type/#post-6399884)
 * I’ve just installed the plugin “The Events Calendar”, and there is the same problem
   with the CPT “Event” created by this plugin. It doesn’t accept the default language
   until I save it in the other one, and come back to the default language.
 *  Plugin Support [Chrystl](https://wordpress.org/support/users/chrystl/)
 * (@chrystl)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-a-custom-post-type/#post-6399886)
 * Hi
    I tested with your code + Polylang 1.7.8 + Twenty Fifteen and it works. Deactivate
   all your plugins except Polylang and test.
 *  Thread Starter [gotfers](https://wordpress.org/support/users/gotfers/)
 * (@gotfers)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-a-custom-post-type/#post-6399890)
 * Dear Chrystl,
    Thank you for your post. The problem comes from plugin “The Events
   Calendar”. But I don’t know how I can correct it. I will see on their own support
   forum. Thanks again.
 *  Thread Starter [gotfers](https://wordpress.org/support/users/gotfers/)
 * (@gotfers)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-a-custom-post-type/#post-6399891)
 * I will post here their answer in case someone else has the same problem
 *  Thread Starter [gotfers](https://wordpress.org/support/users/gotfers/)
 * (@gotfers)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-a-custom-post-type/#post-6399892)
 * With some research, I found several posts on the incompatibilty between polylang
   and the Event Calendar (due to TEC, not polylang). So I will change to another
   event plugin, as Events Maker [](https://wordpress.org/plugins/events-maker/)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Problem with a Custom Post Type’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [gotfers](https://wordpress.org/support/users/gotfers/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-a-custom-post-type/#post-6399892)
 * Status: resolved