Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Adding JavaScript to a Specific WordPress Post or Page Using Code in the Footer

function wpb_hook_javascript_footer() {
    if (is_page ('10')) { 
?>
        <script>
          // your javscript code goes
        </script>
    <?php
}
}
add_action('wp_footer', 'wpb_hook_javascript_footer');
 
PREVIOUS NEXT
Tagged: #Adding #JavaScript #Specific #WordPress #Post #Page #Using #Code #Footer
ADD COMMENT
Topic
Name
4+3 =