• Dave Redfern

    (@daveredfern)


    Hello,

    I want to write a small plugin to add a js file to all admin pages. I have read how to add it to the actual plugin page but not everywhere.

    How do i do this?

    thanks.

    Dave.

Viewing 1 replies (of 1 total)
  • Jeremy Clark

    (@jeremyclark13)

    function plugin_admin_head_js() {
    print "<script type='text/javascript' src='linktoyourjs.js'></script>";
    }
    add_action('admin_head', 'plugin_admin_head_js');
Viewing 1 replies (of 1 total)
  • The topic ‘Add js file to all wordpress admin pages with plugin’ is closed to new replies.