I wanted to create a new <div> on top of the

<div id="wpwrap"> in adminheader.php

and a closing tag below the </body> on adminfooter.php

should i just go create a new div manually? or use a plugin to insert those html tags.


1 Answer 1


You shouldn't edit the WP Core because it will break at the next update. I believe the easiest way is to use jQuery. Use a filter to add the jQuery code to the page.

function cystom_jquery_code() {
   echo '<script>
   jQuery("body").after("div class="myClass"></div>");
   jQuery("#wpwrap").before("<div class="beforeClass"></div>");

add_action('admin_head', 'cystom_jquery_code');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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