• Resolved jaclerigo

    (@jaclerigo)


    Hello,

    can’t make a simple code to work in admin area, but it works fine at the site front-end.

    <?php
    add_action( 'wp_head', function () { ?>
    <script>
    	alert('this is a test');
    </script>
    <?php });

    Can anyone help me on this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jaclerigo

    (@jaclerigo)

    Found the solution. Thanks anyway.

    Peter Leenders

    (@peterleenders)

    What was the solution?

    I think i have the same problem.

    Thread Starter jaclerigo

    (@jaclerigo)

    Hi Peter,

    instead of
    add_action( ‘wp_head’, function (),

    use

    add_action(‘admin_head’, function (),

    Hope it helps.
    Best Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Code Snippet not working on Administration Area’ is closed to new replies.