WPML is not detecting Wordpress custom post types
Posted
by
janoChen
on Stack Overflow
See other posts from Stack Overflow
or by janoChen
Published on 2011-01-15T05:07:47Z
Indexed on
2011/01/16
5:54 UTC
Read the original article
Hit count: 215
Wordpress
I learned how to make custom post types with the following tutorial:
http://sixrevisions.com/wordpress/wordpress-custom-post-types-guide/
It basically consist in adding this code to function.php:
add_action( 'init', 'create_events' );
function create_events() {
$labels = array(
'name' => _x('Events', 'post type general name'),
'singular_name' => _x('Event', 'post type singular name'),
'add_new' => _x('Add New', 'Event'),
'add_new_item' => __('Add New Event'),
'edit_item' => __('Edit Event'),
'new_item' => __('New Event'),
'view_item' => __('View Event'),
'search_items' => __('Search Events'),
'not_found' => __('No Events found'),
'not_found_in_trash' => __('No Events found in Trash'),
'parent_item_colon' => ''
);
$supports = array('title', 'editor', 'custom-fields', 'revisions', 'excerpt');
register_post_type( 'event',
array(
'labels' => $labels,
'public' => true,
'supports' => $supports
)
);
}
The WPML plugin help you to translate posts to different langauges. But this option doesn't appear in the custom post types.
Any suggestions?
© Stack Overflow or respective owner