Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Adding JavaScript to a Specific WordPress Page Using Code In Header

function wpb_hook_javascript() {
  if (is_page ('10')) { 
    ?>
        <script type="text/javascript">
          // your javscript code goes here
        </script>
    <?php
  }
}
add_action('wp_head', 'wpb_hook_javascript');
 
PREVIOUS NEXT
Tagged: #Adding #JavaScript #Specific #WordPress #Page #Using #Code #In #Header
ADD COMMENT
Topic
Name
8+5 =