Post Type Description for ‘Posts’

you can use global $wp_post_types to edit the description for example: add_action(‘init’ , ‘edit_post_description’); function edit_post_description(){ global $wp_post_types; $wp_post_types[‘post’] ->description = ‘type your description here…’; }

Custom post type menu missing after 3.0b2 -> 3.1.2 upgrade

Remove the errors in your registering function: ‘Gigs’ is not part of the default language file. Either add your text domain as second parameter or drop the translation function. ‘_builtin’ => true is wrong. Remove the parameter; it is for native post types only. ‘supports’ => array(‘title’, ‘editor’,/* ‘custom-fields’ */), – the comma after editor … Read more

How do I get Link for Oldest Custom Post Type (dynamically)

Simply change order parameter from DESC to ASC: function Get_First_permalink(){ global $post; $tmp_post = $post; $args = array( ‘numberposts’ => 1, ‘offset’ => 0, ‘orderby’ => ‘post_date’, ‘order’ => ‘ASC’, ‘post_type’ => ‘POST_TYPE_NAME’, ‘post_status’ => ‘publish’ ); $myposts = get_posts( $args ); setup_postdata($myposts[0]); $permalink = get_permalink($post->ID); $post = $tmp_post; return $permalink; } so once you … Read more

Should I use custom taxonomy or custom post type

So, at the end of the day, your content is about resorts (that is, “destination” = resort? If so: Custom Post Type: destination (semantically, it would be “resort”, but you can use “destination” to meet your client’s needs) Custom Taxonomy(ies): location (country, city, etc.) EDIT: How to parse the terminology: Post: noun Taxonomies: adjectives The … Read more

How to show cutom post labels in options?

You just need to pull the Labels via get_post_type_object(); <?php $args=array( ‘public’ => true, ‘_builtin’ => false ); $output=”names”; $operator=”and”; $post_types=get_post_types($args,$output,$operator); ?> <select id=”” name=””> <?php foreach ($post_types as $post_type ) { $label_obj = get_post_type_object($post_type); $labels = $label_obj->labels->name; ?> <option <?php selected( $instance[‘posttype’], $post_type ); ?> value=”<?php echo $post_type; ?>”><?php echo $labels; ?></option> <?php } … Read more