How to Arrange Support => Thumbnail

Pretty much what you can do is replace it, here’s what I use: /** Use “Featured Image” Box As A Custom Box **/ function post_type_featured_image() { add_meta_box( ‘postimagediv’, __(‘Your Custom Title Here’), ‘post_thumbnail_meta_box’, ‘YOUR_POST_TYPE_HERE’, ‘normal’, ‘high’ ); } add_action( ‘do_meta_boxes’, ‘post_type_featured_image’ ); As an explaination you can read up on the add_meta_box() function. You can … Read more

Meta box checkbox won’t save

I found the answer now it was the way i was trying to save it this is what I done in the save function if( isset( $_POST[ ‘ck_sale_item’ ] ) ) { update_post_meta( $post_id, ‘ck_sale_item’, ‘on’ ); } else { update_post_meta( $post_id, ‘ck_sale_item’, ‘off’ ); }

Get all Custom Post Types

Easy list filtering There’s the global $wp_post_types which is used for e.g. in get_post_type_object( $name );, register_post_type(), etc. If you want to omit the ones delivered with core, you should filter the returned list and skip everything that has the _builtin key set to true. Just use wp_list_filter() for that $cpts = wp_list_filter( $GLOBALS[‘wp_post_types’], array( … Read more

How to show/hide a meta box using categories, with a different post type

Instead of if (is_admin()) add_action(‘admin_menu’, ‘add_custom_box’); use add_action(‘add_meta_boxes’, ‘add_custom_box’); The ‘add_meta_boxes’ hook is the correct one to add meta boxes. Other than that, as you mentioned correctly change the ‘post’ to ‘$my-custom-post-type’ and register the category taxonomy for that post type: register_taxonomy_for_object_type( ‘category’, ‘$my-custom-post-type’ )

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