Best Way to Remove WordPress Meta Box based on Post Status

I will suggest to check the $post object in PHP before adding meta box. And add the meta box if status is draft or auto-draft. Consider this code function update_meta_boxes($current_post_type, $post) { $post_types = apply_filters(‘lsw_default_post_types’, LSW_Organize_Drafts::$post_types); remove_meta_box( ‘tagsdiv-lswdrafttype’, $post_types, ‘side’ ); if (isset($post->post_status) && ($post->post_status == ‘draft’ || $post->post_status == ‘auto-draft’)) { add_meta_box(‘lswdrafttype_custom’, __(‘Draft Type’, … Read more

How to: add option to add more checkboxes on custom post type

Your question is very abstract. As far I understood you want some thing like categories. So for that adding metaboxes is not necessary. I think categories are enough. If categories are not full filling your need then make another custom taxonomy with ‘hierarchical’ => true,. I think it will serve your need. Also giving permissions … Read more

Adding a custom field or metabox to the post-thumbnail widget?

Just filter admin_post_thumbnail_html and append your checkbox HTML: add_filter( ‘admin_post_thumbnail_html’, ‘wpse_71501_thumbnail_options’ ); function wpse_71501_thumbnail_options( $html ) { return $html . <<<html <p> <label for=”big_thumbnail”> <input id=”big_thumbnail” name=”big_thumbnail” type=”checkbox” /> Use big thumbnail </label> </p> html; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)