How to bring the javascript file to the wordpress theme via code

0

I have two javascript files inside a folder called (js) and I want to know how to call it in the theme code I'm creating. But how do I do that, I know I have to use the functions.php or am I wrong? I want you to help me because I'm new to creating wordpress themes and I'm having a lot of trouble solving this.

With css I did it and it worked

<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url') ?>/style.css" media="screen,projection"/>
    
asked by anonymous 11.09.2017 / 19:27

1 answer

1

I use it that way.

For javascript:

wp_enqueue_script('scripts', get_bloginfo('template_url') . '/assets/js/scripts.js',array('jquery'));

For style:

wp_enqueue_style('responsive', get_bloginfo('template_url') . '/assets/css/responsivo.css', array(), '1.0', 'all');
    
22.09.2017 / 16:33