public queryable and pll_get_post_types and pll_get_taxonomies question
-
hi
i have some CPT’s and a Custom Taxonomy that are not public but i want to translate them.
they don’t appear in wp-admin/admin.php?page=mlang_settings ‘Custom post types and Taxonomies’
i have added a xpml-config.xml and no luck
<wpml-config> <custom-types> <custom-type translate="1">team</custom-type> <custom-type translate="1">testimonial</custom-type> </custom-types> <taxonomies> <taxonomy translate="1">testimonial-types</taxonomy> </taxonomies> </wpml-config>
i have also tried with pll_get_post_types and pll_get_taxonomies and also failed.
<?php add_filter('pll_get_post_types', 'add_cpt_to_pll', 10, 2); function add_cpt_to_pll($post_types, $is_settings) { if ( $is_settings ) { $post_types['testimonial'] = 'Testimonial'; $post_types['team'] = 'Team'; } return $post_types; } add_filter('pll_get_taxonomies', 'add_tax_to_pll', 10, 2); function add_tax_to_pll($taxonomies, $is_settings) { if ( $is_settings ) { $taxonomies['testimonial-types'] = 'Testimonial categories'; } return $taxonomies; }
any suggestions ?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘public queryable and pll_get_post_types and pll_get_taxonomies question’ is closed to new replies.