• Resolved Björn

    (@bjornsennbrink)


    As it says in the title, I am looking for a way to move the excerpt input area seen on wp-admin/post-new.php, from its current location below the main content window to a position just below the permalink (above the TinyMCE options bar).

    Any ideas? (Hacking the files in the wp-admin folder is not a problem.)

Viewing 6 replies - 1 through 6 (of 6 total)
  • Unfortunately, this is not possible to move the Excerpt where you want to put it.

    It could be done by editing the core code, but you should NEVER edit the core. You would loose all your changes when you upgrade and/or could break functionality

    Thread Starter Björn

    (@bjornsennbrink)

    I am aware of the potential problems that come with hacking the core. But in this case that is not a problem. The goal (moving the input area) is more important than any extra work during upgrades.

    Although not the most ideal solution, this is definately more ideal than hacking the core…

    You can use some very basic Javascript to manipulate the DOM
    Just include the following snippet of jQuery in a JS file loaded within the admin (for the proper way to load JS in just the admin, see http://devpress.com/blog/how-to-load-javascript-in-the-wordpress-admin)

    // Move the excerpt box above the WYSIWYG editor
    jQuery(function($) {
    	var $excerpt	= $('#postexcerpt');
    	var $wysiwyg	= $('#postdivrich');
    
    	$wysiwyg.prepend($excerpt);
    });

    You’ll probably also want to check that you’re on the correct page (and that both of those DOM elements exist) before running the above, but it should give you an idea of what to do.

    Thread Starter Björn

    (@bjornsennbrink)

    Solution by Swedish WP dev company Xoda.

    Damian: I took your code and wrapped it in a simple plugin so one just can activate/deactivate. I’ll add a thanks to you and bjornsennbrink on my page 🙂

    For anyone using the above plugin, you can customise which post-type it’s active on by swapping the if statement in the plugin with the following:

    global $current_screen;
    if($current_screen->post_type == '<POST TYPE>' && ($current_screen->action == 'add' || $current_screen->action == 'edit')){

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Place Excerpt above main content window in Add New Post GUI’ is closed to new replies.