Skip to main content
added 81 characters in body
Source Link
Wyck
  • 18k
  • 4
  • 46
  • 67

You would enqueue it, this is how Javascript is added to WordPress properly. This function would typically go in your theme's functions.php or in a plugin.

function my_scripts_intro() {
     is_front_page(){
         wp_enqueue_script( 'introjs','path to ..intro.js' );
         wp_enqueue_style( 'introcss','path to ..intro.css' );
        }
}
    
add_action( 'wp_enqueue_scripts', 'my_scripts_intro' );

To determine the state of the visitor you would probably want to use cookies.

ps. This questions is very common please use the search.

You would enqueue it, this is how Javascript is added to WordPress properly.

function my_scripts_intro() {
     is_front_page(){
         wp_enqueue_script( 'introjs','path to ..intro.js' );
         wp_enqueue_style( 'introcss','path to ..intro.css' );
        }
}
    
add_action( 'wp_enqueue_scripts', 'my_scripts_intro' );

To determine the state of the visitor you would probably want to use cookies.

You would enqueue it, this is how Javascript is added to WordPress properly. This function would typically go in your theme's functions.php or in a plugin.

function my_scripts_intro() {
     is_front_page(){
         wp_enqueue_script( 'introjs','path to ..intro.js' );
         wp_enqueue_style( 'introcss','path to ..intro.css' );
        }
}
    
add_action( 'wp_enqueue_scripts', 'my_scripts_intro' );

To determine the state of the visitor you would probably want to use cookies.

ps. This questions is very common please use the search.

Source Link
Wyck
  • 18k
  • 4
  • 46
  • 67

You would enqueue it, this is how Javascript is added to WordPress properly.

function my_scripts_intro() {
     is_front_page(){
         wp_enqueue_script( 'introjs','path to ..intro.js' );
         wp_enqueue_style( 'introcss','path to ..intro.css' );
        }
}
    
add_action( 'wp_enqueue_scripts', 'my_scripts_intro' );

To determine the state of the visitor you would probably want to use cookies.