Posts

Adding excerpts to Pages

By the Web Warlock, Wednesday, 28/Jul/2010 3:47

To add excerpts to Pages, from 3.0 on you just need to add the support for the excerpt feature for the page post type with add_post_type_support called in the init hook.

$_wp_post_type_features

By the Web Warlock, Wednesday, 28/Jul/2010 1:16

The global variable $_wp_post_type_features stores the features enabled for the different post types as a boolean value of the index $_wp_post_type_features[post_type][feature].

$wp_post_types

By the Web Warlock, Wednesday, 28/Jul/2010 0:27

$wp_post_types is the global array that stores the post type objects.

register_post_type

By the Web Warlock, Thursday, 24/Jun/2010 10:06

<?php register_post_type( $post_type, $args = array(
		'labels' => array(), 'description' => '', 'publicly_queryable' => null, 'exclude_from_search' => null,
		'_builtin' => false, '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'capabilities' => array(), 'hierarchical' => false,
		'public' => false, 'rewrite' => true, 'query_var' => true, 'supports' => array(), 'register_meta_box_cb' => null,
		'taxonomies' => array(), 'show_ui' => null, 'menu_position' => null, 'menu_icon' => null,
		'permalink_epmask' => EP_PERMALINK, 'can_export' => true, 'show_in_nav_menus' => null ) ); ?>