Where can I find the HTML for a Wordpress site? I'm using the "X" child theme. I found a tutorial explaining how to achieve an effect that I want and it says that "All I need is an HTML markup and to call the script". Also, what does "calling the script" mean? The child theme has a PHP file and a CSS file (the tutorial gives me a javascript file and a CSS file, where would the javascript go? In the PHP file?)

  • Your question is way too broad to answer. If you're still struggling with basic concepts you're more likely to find satisfying information on tutorial sites like wpbeginner than here. – cjbj Jun 27 '16 at 7:42

You got javascript file and CSS file! Then you have to put those files in you child theme folder like themes -> your_child_theme_folder -> js(if you dont have js folder then create one) and place your js file here AND you have to put you css file in css folder inside your child theme.

Now you need to call js file from functions.php

If you dont have functions.php file in you child theme folder then create it first. Here is the code for calling js file

function wpdocs_theme_name_scripts() {
wp_enqueue_script( 'script-name1', get_stylesheet_directory_uri() . '/js/YOUR_JS_FILE_NAME', array('jquery'), true ); //Path of you js file
add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );

In the above code script-name1 is the custom name that you will give to every script you call and the name shud be unique. And I hope you are already aware of calling css file..

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.