1add_action( 'init', 'create_news' );
2function create_news ()
3{
4 register_post_type( 'ecommerces',
5 array(
6 'labels' => array(
7 'name' => __( 'Ecommerces' ),
8 'singular_name' => __( 'Ecommerce' )
9 ),
10 'public' => true,
11 'supports' => array ('title', 'editor', 'thumbnail')
12 )
13 );
14
15 register_taxonomy(
16 'ecommerce_cat',
17 'ecommerces',
18 array(
19 'labels' => array(
20 'name' => 'Ecommerce Categories',
21 'add_new_item' => 'Add New Ecommerce Category',
22 'new_item_name' => "New Ecommerce Category"
23 ),
24 'show_ui' => true,
25 'show_tagcloud' => false,
26 'hierarchical' => true,
27 'hasArchive' => true
28 )
29 );
30
31 }
32
33 if ( function_exists( 'add_theme_support' ) ) {
34 add_theme_support( 'post-thumbnails' );
35 set_post_thumbnail_size( 100, 100, true );
36}
37
38 ?>
1function create_posttype() {
2 register_post_type( 'wpll_product',
3 array(
4 'labels' => array(
5 'name' => __( 'Products' ),
6 'singular_name' => __( 'Product' )
7 ),
8 'public' => true,
9 'has_archive' => true,
10 'rewrite' => array('slug' => 'products'),
11 )
12 );
13}
14add_action( 'init', 'create_posttype' );
15