I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box

Here is a complete tutorial with source files that do exactly what you want, You can upload multi images by cloning the input field and also you can preview, delete images with ajax, add multi metaboxes to multiple/different post types and more. http://www.deluxeblogtips.com/2010/05/howto-meta-box-wordpress.html And here you can find some good information on how you call … Read more

Automatically exclude categories from metabox based on title

You have chosen to tackle a hard problem for one so new to PHP. 🙂 This might get you closer to your goal: global $wpdb; if ( in_array( $pagenow, array(‘post.php’, ‘post-new.php’) ) ) { foreach (get_categories() as $category) { $cat_time = strtotime($category->cat_name); if ( $cat_time < strtotime(‘-3 days’) || $cat_time > strtotime(‘+2 months’) ) $exclude … Read more

Dashboard – get status and position of metaboxes and pass them to ajax method

You can hook into the sortstop event of the sortable metaboxes, and read the current state: jQuery( function( $ ) { $( ‘.meta-box-sortables’ ).bind( ‘sortstop’, function( event, ui ) { var sortData = {}; $(‘.meta-box-sortables’).each( function() { sortData[this.id.split(‘-‘)[0]] = $(this).sortable( ‘toArray’ ); } ); console.log( sortData ); } ); } ); You can also hook … Read more

Multiple Meta Boxes in separate files

Save each meta box out to a file with the code as if they were in your functions.php file. Maybe place these in a folder called meta_boxes. Then to include into your theme just include() them into your functions file <?php // all the code that your functions file contains include(“meta_boxes/meta1.php”); include(“meta_boxes/meta2.php”); include(“meta_boxes/meta3.php”); include(“meta_boxes/meta4.php”); // … Read more

How to modify Publish metabox?

I always do it with Frank Bültge’s Adminimize in Global Options, you’ll find Your Own Options in the left column you put any name for your reference in the right column you put the ID or Classes you want to hide if I’m not mistaken, you’d want to hide this #visibility.misc-pub-section,.misc-pub-section.curtime.misc-pub-section-last Here’s a reference list … Read more

Creating an “admin only” meta box with WPAlchemy. Getting a fatal error on front-end when using current_user_can

try the following: $custom_admin_mb = new WPAlchemy_MetaBox(array( ‘id’ => ‘_custom_admin_meta’, ‘title’ => ‘Admin only’, ‘template’ => get_stylesheet_directory() . ‘/custom/admin_meta.php’, ‘output_filter’ => ‘my_output_filter’, )); function my_output_filter() { if (current_user_can(‘administrator’)) return true; return false; }

Linking text within textarea of custom meta box

I finally found the answer to this and am posting it here in case someone else needs the answer. Just put the following in your theme file. <?php global $post; $variable_name = get_post_meta($post->ID, ‘custom_metaBox’, true); echo html_entity_decode( $variable_name ); ?> Change the variable name and custom_metaBox to your specific values and voila, functioning HTML code.

Can’t get metabox value (a url) returned using WPAlchemy

Try changing your display_url_info function to <?php add_filter(‘beernews-child-theme_post’, ‘display_url_info’); function display_url_info() { // usually needed global $basic_metabox; $basic = $basic_metabox->the_meta(); if($basic[‘post_link_url’]) { echo $basic[‘post_link_url’]; } else { echo ‘ERROR : “post_link_url” empty’; } } ?> And not to be a jerk, but I would like to point out that WP Alchemy is not a plugin … Read more