Sorry, the CPT is ‘portfolio’ not ‘works’.
Support editor is not an option on my theme.
the code for the CPT:
#-----------------------------------------------------------------#
# Create admin portfolio section
#-----------------------------------------------------------------#
function portfolio_register() {
$portfolio_labels = array(
'name' => __( 'Portfolio', 'taxonomy general name', NECTAR_THEME_NAME),
'singular_name' => __( 'Portfolio Item', NECTAR_THEME_NAME),
'search_items' => __( 'Search Portfolio Items', NECTAR_THEME_NAME),
'all_items' => __( 'Portfolio', NECTAR_THEME_NAME),
'parent_item' => __( 'Parent Portfolio Item', NECTAR_THEME_NAME),
'edit_item' => __( 'Edit Portfolio Item', NECTAR_THEME_NAME),
'update_item' => __( 'Update Portfolio Item', NECTAR_THEME_NAME),
'add_new_item' => __( 'Add New Portfolio Item', NECTAR_THEME_NAME)
);
global $options;
$custom_slug = null;
if(!empty($options['portfolio_rewrite_slug'])) $custom_slug = $options['portfolio_rewrite_slug'];
$portolfio_menu_icon = (floatval(get_bloginfo('version')) >= "3.8") ? 'dashicons-art' : NECTAR_FRAMEWORK_DIRECTORY . 'assets/img/icons/portfolio.png';
$args = array(
'labels' => $portfolio_labels,
'rewrite' => array('slug' => $custom_slug,'with_front' => false),
'singular_label' => __('Project', NECTAR_THEME_NAME),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'hierarchical' => false,
'menu_position' => 9,
'menu_icon' => $portolfio_menu_icon,
'supports' => array('title', 'editor', 'thumbnail', 'comments', 'revisions')
);
register_post_type( 'portfolio' , $args );
}
add_action('init', 'portfolio_register');
The code for feed:
if(function_exists('add_theme_support')) {
add_theme_support('automatic-feed-links');
}