• Resolved wpismypuppet

    (@wordpressismypuppet)


    I am trying to find a proper WordPress solution to moving a custom meta box above the built in editor and below the title. I can add the editor itself to a meta box and move it that way, and I can also use a little javascript to do it as well… But I’m trying to keep it clean and use built-in WordPress functionality without “hacks”.

Viewing 16 replies (of 16 total)
  • I managed to figure it out.
    Here is my solution adapted from Troy’s script (thanks for the help!)

    // Move TinyMCE Editor to the bottom
    	add_action( 'add_meta_boxes', 'action_add_meta_boxes', 0 );
    	function action_add_meta_boxes() {
    		global $_wp_post_type_features;
    			if (isset($_wp_post_type_features['currentevent']['editor']) && $_wp_post_type_features['currentevent']['editor']) {
    				unset($_wp_post_type_features['currentevent']['editor']);
    				add_meta_box(
    					'description_section',
    					__('Description'),
    					'inner_custom_box',
    						'currentevent', 'normal', 'low'
    				);
    			}
    	add_action( 'admin_head', 'action_admin_head'); //white background
    	}
    	function action_admin_head() {
    	?>
    	<style type="text/css">
    		.wp-editor-container{background-color:#fff;}
    	</style>
    	<?php
    	}
    	function inner_custom_box( $post ) {
    	echo '<div class="wp-editor-wrap">';
    	//the_editor is deprecated in WP3.3, use instead:
    	//wp_editor($post->post_content, 'content', array('dfw' => true, 'tabindex' => 1) );
    	the_editor($post->post_content);
    	echo '</div>';
    	}
Viewing 16 replies (of 16 total)
  • The topic ‘Move custom meta box above editor’ is closed to new replies.