Answers for "add_action( 'wp_head'"

1

do_action( 'wp_head' );

function hook_javascript() {
    ?>
        <script>
            alert('Page is loading...');
        </script>
    <?php
}
add_action('wp_head', 'hook_javascript');
Posted by: Guest on May-28-2020
0

do_action( 'wp_head' );

function hook_css() {
    ?>
        <style>
            .wp_head_example {
                background-color : #f1f1f1;
            }
        </style>
    <?php
}
add_action('wp_head', 'hook_css');
Posted by: Guest on May-28-2020
1

wp add_action

add_action('wp_footer', function($arguments) use ($myvar) { 
    echo $myvar;
}, $priority_integer, $accepted_arguments_integer);
Posted by: Guest on November-27-2020

Browse Popular Code Answers by Language