Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- / Custom post type for products on sale and links-page
- add_action('init', 'create_posttype');
- function create_posttype() {
- register_post_type( 'sale',
- array(
- 'labels' => array(
- 'name' => __( 'Sale' ),
- 'singular_name' => __( 'Sale' )
- ),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'sale'),
- 'taxonomies' => array('category', 'sale')
- ),
- register_post_type( 'links',
- array(
- 'labels' => array(
- 'name' => __( 'Links' ),
- 'singular_name' => __( 'Links' )
- ),
- 'public' => true,
- 'has_archive' => true,
- 'rewrite' => array('slug' => 'links'),
- 'supports' => array( 'title', 'editor', 'custom-fields' )
- )
- ));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement