Title: Custom Post Types
Last modified: August 21, 2016

---

# Custom Post Types

 *  Resolved [jmayoff](https://wordpress.org/support/users/jmayoff/)
 * (@jmayoff)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-types-76/)
 * I thought I found what I was looking for, when I found this post from a few months
   ago, but sadly it didn’t help.
 * [http://wordpress.org/support/topic/polylang-and-custom-post-types](http://wordpress.org/support/topic/polylang-and-custom-post-types)
 * I’m using a theme that has a custom post type called Slides. I want to be able
   to have different slides for different languages (English, French), the way French
   and Englisy posts and pages can be associated with each other.
 * The above link states
 * > You just have to register your post type as usual for example in a function
   > hooked to the ‘init’ action. If you register it with ‘show_ui’ set to true,
   > then it is automatically created with multilingual support.
 * The post type is registered with ‘show_ui’ set to true, but there’s no option
   in the Dashboard to associate slides of different languages (as with regular 
   posts. Also, I’m not sure if the function is hooked to the ‘init’ action. Here
   it is:
 *     ```
       /*-----------------------------------------------------------------------------------*/
   
       /*	Create a new post type called slides
   
       /*-----------------------------------------------------------------------------------*/
   
       function bnk_register_post_type_slides() 
   
       {
   
       	$labels = array(
   
       		'name' => __( 'Slides','bhinneka'),
   
       		'singular_name' => __( 'Slide','bhinneka' ),
   
       		'rewrite' => array('slug' => __( 'Slides','bhinneka' )),
   
       		'add_new' => _x('Add New', 'Slide'),
   
       		'add_new_item' => __('Add New Slide','bhinneka'),
   
       		'edit_item' => __('Edit Slide','bhinneka'),
   
       		'new_item' => __('New Slide','bhinneka'),
   
       		'view_item' => __('View Slide','bhinneka'),
   
       		'search_items' => __('Search Slides','bhinneka'),
   
       		'not_found' =>  __('No slides found','bhinneka'),
   
       		'not_found_in_trash' => __('No slides found in Trash','bhinneka'), 
   
       		'parent_item_colon' => ''
   
       	  );
   
       	  $args = array(
   
       		'labels' => $labels,
   
       		'public' => true,
   
       		'publicly_queryable' => true,
   
       		'show_ui' => true, 
   
       		'query_var' => true,
   
       		'rewrite' => true,
   
       		'capability_type' => 'post',
   
       		'hierarchical' => false,
   
       		'menu_position' => 5,
   
       		'supports' => array('title','thumbnail','custom-fields')
   
       	  ); 
   
       	  register_post_type(__( 'slide','bhinneka' ),$args);
   
       }
       ```
   
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

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

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-types-76/#post-3785262)
 * Things have changed since that time. Now you should find an option in Polylang
   settings to activate the language and translation management for this post type.
   It should work if the action is “hooked to an init action”.
 * In the code it should look like this:
 *     ```
       add_action('init', 'bnk_register_post_type_slides');
       ```
   
 * So if you can’t find the checkbox in Polylang settings, try finding where ‘bnk_register_post_type_slides’
   elsewhere in the theme’s code.
 * Finally, I believe that’s not a good idea to write:
 *     ```
       register_post_type(__( 'slide','bhinneka' ),$args);
       ```
   
 * It is better not to enable translation for something which is never displayed
   but used internally by WordPress. It can work on a monolingual site, but it will
   likely break in a multilingual site. You should change this to:
 *     ```
       register_post_type('slide', $args);
       ```
   
 *  Thread Starter [jmayoff](https://wordpress.org/support/users/jmayoff/)
 * (@jmayoff)
 * [13 years ago](https://wordpress.org/support/topic/custom-post-types-76/#post-3785265)
 * I found it in the Settings. I should have looked there first. Thanks for the 
   quick reply.

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

The topic ‘Custom Post Types’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [jmayoff](https://wordpress.org/support/users/jmayoff/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/custom-post-types-76/#post-3785265)
 * Status: resolved