0

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.

thanks.

1 Answer 1

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>");
   </script>';
}

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.