Add TinyMCE to CPT metaboxes in 3.1?

Use this class: http://www.deluxeblogtips.com/p/meta-box-script-for-wordpress.html and then call the metabox like this (don’t forget to read the manual and view some examples): $meta_boxes[] = array( ‘id’ => ‘textmetabox’, ‘title’ => ‘Your Meta Box Title’, ‘pages’ => array(‘post’, ‘slider’, ‘whatever-your-cpt-is’), ‘fields’ => array( array( ‘name’ => ‘Your thoughts about Deluxe Blog Tips’, ‘id’ => $prefix . ‘thoughts’, … Read more

Dynamically add / duplicate custom meta in custom post types

I will answer myself after some research 🙂 while there might be appropriate ways of coding this with some custom function, for me there’s no need to reinvent the wheel when there’s a neat plugin that does the job it’s called “advanced custom fields” http://wordpress.org/extend/plugins/advanced-custom-fields/ it has a “repeater” to let admins add more fields … Read more

Meta box dropdown of custom posts

What I would do is just create a custom taxonomy type to share between both custom post types that are dynamically created when a new post of the Clients type is created with the same title, then you can associate them without any custom meta handling.

How to add categories to page editor?

You’ll need to register the category taxonomy for the page post_type with register_taxonomy_for_object_type. This does the trick: <?php add_action( ‘init’, ‘wpse34528_add_page_cats’ ); function wpse34528_add_page_cats() { register_taxonomy_for_object_type( ‘category’, ‘page’ ); }

Change headline text for post thumbnail meta box

Featured Image box is internally a meta box, added using add_meta_box (ref. edit-form-advanced.php line no. 128). As far as my research went, there is no filter applied to the meta box title (ref. template.php line no. 846). Hence you cant change the metabox title using a filter. Though you can try printing the contents of … Read more

retrieve meta key when checkbox is used

You need to add the third parameter to get_post_meta(), so get_post_meta( get_the_ID(), ‘home’, true ) should at least get you closer. Just a note, in future, try doing a var_dump() or print_r() on the variable(s) in the condition that are evaluating in an unexpected manner, if you’d done that here you would have seen that … Read more

Show add_meta_box by selecting a specific category

You could try this: get the ID’s of the attached categories and wrap your add_meta_box function inside a simple test against your defined cat ID. add_action(‘add_meta_boxes’, ‘is_in_cat_example’); function is_in_cat_example() { global $post; $category = ‘5’; // can be an array of ID’s as well if ( in_category( $category, $post ) ) { add_meta_box(…); } }

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