Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i need to add a custom form on the post-new0.php page of the admin of wordpress. ( this form will load an external script in ajax and fill all the field) I'm able to do it via my plugin with

add_action('admin_print_scripts-post-new.php', 'my_echo_function');

But it print it at the top of the page, how can i do to print it as i show on the image ? ( just above the title post text area). ny idea ? Thank you.

EDIT: it can be before or after th wp form this is where i print it right now:

where its printed

illustration

share|improve this question

1 Answer 1

WordPress 3.7 has an edit_form_top hook that may be what you need.

add_action('edit_form_top', 'my_echo_function');

Though you will need to write logic to keep it from executing on any but the post-new.php page.

share|improve this answer
    
It should be outside the wp form, because i'm addming a new <form> –  user2845771 Dec 3 '13 at 14:49
    
I don't think that is going to be easy. Why not work with the form you already have? –  s_ha_dum Dec 3 '13 at 14:55
    
Because it's different, my form do somethimg all, it post some variable somewhere else –  user2845771 Dec 3 '13 at 15:16
    
But your question mentions AJAX. It doesn't matter if it is the same form or not. Don't use a <form> tag and manipulate everything with Javascript-- kind of like the "custom fields" meta box. In other words, you have decided on a solution that is fighting uphill all the way. Rethink the solution and use what you have available. –  s_ha_dum Dec 3 '13 at 15:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.