• Resolved jaumesala

    (@jaumesala)


    Move the Position of the WordPress WYSIWYG Visual Editor below sortables boxes on edit.php only for a certain custom post. (note that you have to change custom_postype_name for the postype name)

    In functions.php you have to add this code.

    function admin_footer_hook(){
    	global $post;
    	if ( get_post_type($post) == 'name_of_custom_tpostype') {
    ?>
    	<script type="text/javascript">
    		jQuery('#normal-sortables').insertBefore('#postdivrich');
    	</script>
    <?php
    	}
    }
    add_action('admin_footer','admin_footer_hook');
Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter jaumesala

    (@jaumesala)

    This is useful for example if you want to add a Custom Fields Template (a data form for the post) and you want to show it before the Visual or HTML editor

    comunite

    (@comunite)

    I don’t quite understand your directions – i’m guessing that you are talking about functions.php in the template that I am using… I try that and no changes are made.

    I would like to display custom field before the editor, right after “title”

    Any help appreciated!

    Thread Starter jaumesala

    (@jaumesala)

    Hi,

    First of all please take a look to the screen shot I made for you

    https://www.budasfactory.com/videotutoriales/move_editor_wp.png

    Yes, you must put the code in functions.php then you can drag sortables boxes before post editor.

    Note that I made the code only for custom_post_type. Is that what you want?

    Thank you Jaumesala! working now!

    Thread Starter jaumesala

    (@jaumesala)

    Was the image helpful?

    Can we move the title editor also?

    Thread Starter jaumesala

    (@jaumesala)

    I’m sorry Amitash, I don’t know. Did you tried?

    In your code above #postdivrich refers to the visual editor. I tried changing it to #posttitle and #post-title etc., but it did not work.

    Thread Starter jaumesala

    (@jaumesala)

    Amitash,

    The idea is make things sortable, one’s the code is activate you can drag and drop items that before there weren’t sortable.

    I hope this will be helpfull

    Jaumesala,
    I know that. I just wanted to move the title editor as well. ??

    Thread Starter jaumesala

    (@jaumesala)

    Now I’m at work, I can try but I belive that the only thing you have to change is

    jQuery(‘#normal-sortables’).insertBefore(‘#postdivrich’);

    for

    jQuery(‘#normal-sortables’).insertBefore(‘#_the_div_name_that_contains_all_post’);

    Do you underand me?

    Yes, I got it, I’ll try. Thanks a lot for your efforts. In fact, I could successfully work it out using the following code.

    jQuery('#normal-sortables').insertBefore('#titlediv');

    Thread Starter jaumesala

    (@jaumesala)

    Congratulations!

    So Now is working fine?

    Yes, I am able to move the panels above the title editor as well as post editor. Thanks a lot for your help ??

    Thread Starter jaumesala

    (@jaumesala)

    Amazing!

    For all community as well

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Move the Position of the WordPress Visual or HTML Editor below sortables boxes’ is closed to new replies.