Advertisement
Digitalraindrops

Advert Post Type (functions.php)

Mar 15th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1. <?php
  2. add_action( 'init', 'info_advert_init' );
  3.  
  4. /* Here we create our Advertisment Custom Post Types */
  5. function info_advert_init() {
  6.    
  7.     $labels = array(
  8.         'name' => _x( 'Content Advertisment', 'Content Advertisments' ),
  9.         'singular_name' => _x( 'Content Advertisment', 'Content Advertisment' ),
  10.         'add_new' => _x( 'Add New', 'advert' ),
  11.         'add_new_item' => __( 'Add New Advertisment' ),
  12.         'edit_item' => __( 'Edit Advertisment' ),
  13.         'new_item' => __( 'New Advertisment' ),
  14.         'view_item' => __( 'View Advertisment' ),
  15.         'search_items' => __( 'Search Advertisments' ),
  16.         'not_found' =>  __( 'No Advertisment found' ),
  17.         'not_found_in_trash' => __( 'No Advertisments found in Trash' ),
  18.         'parent_item_colon' => '',
  19.         'show_in_nav_menus' => false
  20.     );
  21.  
  22.     $args = array( 'labels' => $labels,
  23.         'public' => true,
  24.         'publicly_queryable' => true,
  25.         'show_ui' => true,
  26.         'query_var' => true,
  27.         'rewrite' => true,
  28.         'capability_type' => 'post',
  29.         'hierarchical' => false,
  30.         'menu_position' => null,
  31.         'supports' => array( 'title', 'editor')
  32.     );
  33.  
  34.     register_post_type( 'advert', $args );
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement