Title: Polylang and CPT
Last modified: August 21, 2016

---

# Polylang and CPT

 *  Resolved [maxxdesign](https://wordpress.org/support/users/maxxdesign/)
 * (@maxxdesign)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/polylang-and-cpt/)
 * I use the Ego theme and Polylang recognize the Portfolios cpt, but the Homepage
   Slides and Homepage Sections were not visible in the plugin admin. So I added
   this code
 * add_filter(‘pll_get_post_types’, ‘my_pll_get_post_types’);
    function my_pll_get_post_types(
   $types) { return array_merge($types, array( ‘Homepage Slides’ => ‘Homepage Slides’,‘
   Homepage Sections’ => ‘Homepage Sections’)); } Now I see two new checkboxes in
   the admin but without label and the cpt have no more the language box in the 
   edit section. Any suggestion?

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

 *  Thread Starter [maxxdesign](https://wordpress.org/support/users/maxxdesign/)
 * (@maxxdesign)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/polylang-and-cpt/#post-4693622)
 * Ok solved by myself
 * The right code is below
 * add_filter(‘pll_get_post_types’, ‘my_pll_get_post_types’);
    function my_pll_get_post_types(
   $types) { return array_merge($types, array( ‘udt_homepage_slider’ => ‘udt_homepage_slider’,‘
   udt_homepage_secs’ => ‘udt_homepage_secs’)); }
 * I used the name in the previous array but the code works using the theme slug
   for the cpt
 *  Thread Starter [maxxdesign](https://wordpress.org/support/users/maxxdesign/)
 * (@maxxdesign)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/polylang-and-cpt/#post-4693623)
 * What I named slug is really the cpt as named in the register function

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

The topic ‘Polylang and CPT’ is closed to new replies.

 * 2 replies
 * 1 participant
 * Last reply from: [maxxdesign](https://wordpress.org/support/users/maxxdesign/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/polylang-and-cpt/#post-4693623)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
