Search
 
SCRIPT & CODE EXAMPLE
 

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');
Comment

PREVIOUS NEXT
Code Example
Php :: magento 2 db connection 
Php :: how hide empty category woocommerce wordpress 
Php :: laravel model sync 
Php :: php array_intersect 
Php :: how to maintain serial number in pagination in laravel blade 
Php :: laravel faker example 
Php :: laravel fetch max value 
Php :: php get object josn 
Php :: Eloquent models events 
Php :: woocommerce change add to cart button text 
Php :: php json get value by key 
Php :: query relationships laravel and select some columns 
Php :: wherehas laravel search 
Php :: check array is associative laravel 
Php :: static php 
Php :: php array pop by value 
Php :: list() php 
Php :: php get screen size 
Php :: php associative array join key values 
Php :: wordpress how to match password 
Php :: php custom autoload 
Php :: how to make a comment in php 
Php :: office 2013 
Php :: get date after 1 dayphp 
Php :: add two numbers in php 
Php :: php get 
Php :: laravel eloquent update 
Php :: drupal 9 guzzle client increase timeout 
Php :: php apply function to array elements 
Php :: magento2 get full details of order collection 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =