Disable Multimedia Box on a Per-Post Basis

Applies to Version(s): Thesis 1

By default, when the Multimedia Box is enabled in Thesis Design Options, it appears on every post and page of your site. But what if you’d like to disable the Box on one or more of your posts? Using a custom field plus a little bit of PHP, you can make it happen.

First, you’ll want to get the code in place so that it will be active whenever you publish your first “no Multimedia Box” post — paste the following in custom_functions.php:

function disable_mmbox_single() {
	global $post, $thesis_design;
	$no_mmbox = get_post_meta($post->ID, 'no_mmbox', true);
	if (is_single() && $no_mmbox)
		$thesis_design->multimedia_box['status'] = "0";
}
add_action('thesis_hook_before_html','disable_mmbox_single');

Now, when creating a post for which you wish to disable the Multimedia Box, simply create a new Custom Field with a Key of no_mmbox and a Value of 1. Publish the post, and the Multimedia Box will be suppressed for that post on your live site!