Add filter ‘wpautop’ to meta box textarea

Add a function that grabs your meta data, applies wpautop and echoes it out, or otherwise run it through when you output it in your template. $my_meta = get_post_meta($post->ID,’_my_meta’,TRUE); echo $my_meta[‘name’]; echo wpautop( $my_meta[‘description’], 1 );

Why is my custom meta box input not saving

Try changing: <input class=”widefat” type=”text” placeholder=”[galleryview id=X]” name=”rs-job-gallery” id=”rs-job-gallery” value=”<?php echo esc_attr( get_post_meta( $object->ID, ‘rs_job_gallery’, true ) ); ?>” size=”30″/> to this: <input class=”widefat” type=”text” placeholder=”[galleryview id=X]” name=”rs_job_gallery” id=”rs-job-gallery” value=”<?php echo esc_attr( get_post_meta( $object->ID, ‘rs_job_gallery’, true ) ); ?>” size=”30″/> Reason: When the “name” attribute is set in the input field, that becomes the $_POST[‘input_name’] … Read more

Removing custom meta box added in parent theme

Note: This is the merged version between my and @toscho answers. Explanation (by @toscho) Use add_meta_boxes_page as action hook. You can find the hook in wp-admin/edit-form-advanced.php and it displays as: do_action(‘add_meta_boxes_’ . $post_type, $post); Solution(s) Try the following action, which is inside register_post_type() as well. function wpse59607_remove_meta_box( $callback ) { remove_meta_box( ‘id-of-meta-box’ , ‘page’ , … Read more

Access the environment of an admin page from another admin page

Ok, this could be achieved this way, probably. add_action(‘add_meta_boxes_my_super_duper_post_type’, ‘get_metabox_global_ajax’, 9999 ); function get_metabox_global_ajax(){ if( isset($_GET[‘mgv’]) && $_GET[‘mgv’] == ‘1’ ){ global $wp_meta_boxes; @error_reporting( 0 ); header( ‘Content-type: application/json’ ); die( json_encode( $wp_meta_boxes )); } } Now, you send a request from your plugin page to post-new.php?post_type=my_super_duper_post_type&mgv=1 through ajax, and use the returned json response … Read more

How to store the value of a custom field dropdown select for post referencing?

selected() was big help for setting a default value. The rest I found in this brilliant meta box tutorial: http://code.tutsplus.com/tutorials/how-to-create-custom-wordpress-writemeta-boxes–wp-20336 with examples for text input, checkboxes and dropdown. Also Custom post type’s slug gets wrong when adding a custom meta box explained me how to correctly handle the current post object so it doesn’t get … Read more

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