Disable block with taxonomies at post page

Use remove_meta_box remove_meta_box( ‘categorydiv’, ‘post-type-name’, ‘side’ ); And hook it to ‘admin_menu’ as in the Codex. function my_remove_cat_box() { remove_meta_box( ‘categorydiv’, ‘post-type-name’, ‘side’ ); } add_action( ‘admin_menu’, ‘my_remove_meta_boxes’ ); I am guessing a little at the first parameter–‘categorydiv’–, but that is what it looks like based on your screen shot.

Page template with different page and post content

the_content() (and many others) must be inside The Loop. For retrieving a post/page/custom-post-type data outside the Loop, take a look here: Get post content from outside the loop The working code, based on your example, would be: <div class=”middle-inner”> <div class=”center-inner”> <!– This is content –> <?php global $post; query_posts(“post_type=roomtype&orderby=name”); if ( have_posts() ) { … Read more

Custom loop with multiple taxonomy queries

Here’s a function to do a query with multiple taxonomies: function posts_search ($post_type,$taxonomies) { // $taxonomies should be an array (‘taxonomy’=>’term’, ‘taxonomy2’=>’term2’) foreach ($taxonomies as $key=>$value) { $args=array(‘post_type’=>$post_type,’post__in’=>$ids,$key=>$value); unset($ids); $ids=array(); foreach($posts=get_posts($args) as $post) { $ids[]=$post->ID; } if (empty($ids)) return false; } return $posts; } And here’s an example on how i used it in a … Read more

dynamically add a custom field or metabox to custom post type [duplicate]

To add a metabox to a post type car use the proper hook: add_action( ‘add_meta_boxes_car’, ‘register_car_metabox’ ); function register_car_metabox() { add_meta_box( ‘car-data’, ‘Car data’, ‘car_metabox_callback’, NULL, ‘normal’, ‘default’ ); } The content will be created in your callback: function car_metabox_callback() { # get post meta and print input fields }

Hide editor while keeping add media button in custom post type

WordPress uses the function wp_editor() and there are no parameter that will disable the textarea (what i can see). So i think that you can just hide it with some css. function wpse_78595_hide_editor() { global $current_screen; if( $current_screen->post_type == ‘custom_post_type_name’ ) { $css=”<style type=”text/css”>”; $css .= ‘#wp-content-editor-container, #post-status-info, .wp-switch-editor { display: none; }’; $css .= … Read more