1// Get template directory example:
2<img src="<?php echo get_template_directory_uri(); ?>/images/logo.png" />
3
4// If you use child theme you will have to use another function:
5<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png" />
6
1add_action('wp_enqueue_scripts', 'wpdocs_scripts_method');
2
3/*
4 * Enqueue a script with the correct path.
5 */
6function wpdocs_scripts_method() {
7 wp_enqueue_script(
8 'custom_script',
9 get_template_directory_uri() . '/js/custom_script.js',
10 array('jquery')
11 );
12}
13