get paid to paste

Apartments Custom post type

<?php

add_action('init', 'ap_register');
 
function ap_register() {
 
	$labels = array(
		'name' => _x('Apartments', 'post type general name'),
		'singular_name' => _x('Apartment', 'post type singular name'),
		'add_new' => _x('Add', 'apartment'),
		'add_new_item' => __('Add Apartment'),
		'edit_item' => __('Edit Apartment'),
		'new_item' => __('New Apartment'),
		'view_item' => __('View Apartment'),
		'search_items' => __('Search Apartments'),
		'not_found' =>  __('Nothing found'),
		'not_found_in_trash' => __('Nothing found in Trash'),
		'parent_item_colon' => ''
	);
 
	$args = array(
		'labels' => $labels,
		'public' => true,
		'publicly_queryable' => true,
		'show_ui' => true,
		'query_var' => true,
		'rewrite' => true,
		'capability_type' => 'post',
		'hierarchical' => false,
		'menu_position' => 5,
		'taxonomies' => 'locations',
		'supports' => array('title','editor','thumbnail','custom-fields','author','excerpt')
	  ); 
 
	register_post_type( 'apartments' , $args );
	flush_rewrite_rules();
?>

Pasted: Sep 11, 2010, 8:14:40 pm
Views: 103