How add custom css and jquery in wordpress

How add custom css and jquery in wordpress

This code put in functions.php and set path as folder.

/**
* Enqueue scripts and styles for the front end.
*/
function your_function_scripts() {
wp_enqueue_style('style', get_template_directory_uri() . '/style.css', '', '1.0');
wp_enqueue_style('bootstrap_theme_mini', get_template_directory_uri() . '/css/bootstrap.css', '', '1.0');
wp_enqueue_style('theme_mini', get_template_directory_uri() . '/css/theme.css', '', '1.0');

wp_enqueue_script( 'jquery_min','//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js', 0 );
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'), '1.0', 0 );
}
add_action( 'wp_enqueue_scripts', 'your_function_scripts' );

Above snippet using to we add custom CSS and jQuery in Front end.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s