Jump to content
Sign in to follow this  
bluecloud

How to add post types and taxonomies

Recommended Posts

bluecloud    3
bluecloud

I want to add a post type and some taxonomies. How can I do this? I've tried it to add this in the functions.php in the Pagelines customize plugin, but it doesn't work.

	function add_custom_posttype() {
	    $args = array (
	            'labels' => array(
	                'name' => _x('Property', 'post type general name'),
	                'singular_name' => _x('Property', 'post type singular name'),
	                'menu_name' => _x('Properties', 'bccp')
	            ),
	            'public' => true,
	            'publicly_queryable' => true,
	            'show_ui' => true,
	            'show_in_menu' => true,
	            'query_var' => true,
	            'rewrite' => true,
	            'capability_type' => 'post',
	            'has_archive' => true,
	            'hierarchical' => false,
	            'menu_position' => null,
	            'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments')
	         );
	    register_post_type('property', $args);
	}
	add_action('init', 'add_custom_posttype');

In a custom plugin the post type is added.

Share this post


Link to post
Share on other sites
Rob    547
Rob
Personally, I use Custom Press to add post types and taxonomies. I'm not sure that function will work in the PageLines Customize plugin (I'm not a developer or coder). The Custom Press plugin makes it very, very easy to add both. http://wordpress.org/extend/plugins/custom-press/ There are many other plugins similar to that, and a few that help develop custom plugins and applications for WordPress.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×