newssnippetsimagesfav

Blog > Scripts > PHP Scripts > Wordpress > How to create a custom post type in WordPress 3.0

Last articles

  • Google Plus Opens first API developer system
    Google Plus Opens first API developer system
  • Seagate GoFlex – the biggest external HDD
    Seagate GoFlex – the biggest external HDD
  • Baidu to have a new mobile OS
    Baidu to have a new mobile OS
  • How to Download YouTube Songs Onto iTunes, mp3
    How to Download YouTube Songs Onto iTunes, mp3
  • How to Download YouTube Songs
    How to Download YouTube Songs
  • Google will close 10 services
    Google will close 10 services
  • Deep Sea Wallpapers
    Deep Sea Wallpapers
  • 200 Abstract and Light Wallpapers
    200 Abstract and Light Wallpapers
  • How to test shortlinks
    How to test shortlinks
  • Huawei MediaPad – first 7 inch Android 3.2 tablet
    Huawei MediaPad – first 7 inch Android 3.2 tablet

How to create a custom post type in WordPress 3.0

0

WordPress 2.9 currently have two types of articles: post and pages.

WordPress 3.0 comes with an important novelty: types of articles.

What is so special ?

Suppose you have a music industry news site. With this new organization you can have a section of Albums / disks kept separated from the News section. Or maybe a section with your artists. You cand do that with the following code:

1
<pre>$args = array(
        'label' => __('Discuri'),
        'singular_label' => __('Discuri'),
        'public' => true,
        'show_ui' => true,
        'capability_type' => 'page',
        'hierarchical' => false,
        'rewrite' => true,
        'query_var' => 'discuri',
        'supports' => array('title', 'thumbnail')
);
register_post_type( 'discuri' , $args );</pre>

If you liked the article share it by Twitter, Facebook and Google +1.




    Custom post types with custom taxonomies
    Custom post types with custom taxonomies
    WordPress 3.0: Query custom post types
    WordPress 3.0: Query custom post types
    Custom css for article
    Custom css for article
    show most commented pages with images in WordPress
    show most commented pages with images in WordPress
    WordPress 3.0: Custom author profiles
    WordPress 3.0: Custom author profiles
Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>