30 March 2021

WordPress include the custom css and js in WordPress function.php

<?php

/**

 * Functions and definitions

 *

 * @link https://developer.wordpress.org/themes/basics/theme-functions/

 *

 * @package WordPress

 * @subpackage Twenty_Twenty_One

 * @since Twenty Twenty-One 1.0

 */

// Load Shoppy styles

function shoppy_stylesheets()

{

    // Load  styles.css

    wp_register_style('bootstrap.css', get_template_directory_uri() . '/css/bootstrap.css', array(), '1.0', 'all');

    wp_enqueue_style('bootstrap.css');

    wp_register_style('style.css', get_template_directory_uri() . '/css/style.css', array(), '1.0', 'all');

    wp_enqueue_style('style.css');

    wp_register_style('font-awesome.css', get_template_directory_uri() . '/css/font-awesome.css', array(), '1.0', 'all');

    wp_enqueue_style('font-awesome.css');

    wp_register_style('easy-responsive-tabs.css', get_template_directory_uri() . '/css/easy-responsive-tabs.css', array(), '1.0', 'all');

    wp_enqueue_style('easy-responsive-tabs.css');


    // Load  Js

    wp_register_script('jquery-2.1.4.min.js', get_template_directory_uri() . '/js/jquery-2.1.4.min.js', array(), '4.3.0', false); // Conditionizr

        wp_enqueue_script('jquery-1.7.2.min.js'); // Enqueue it!

    wp_register_script('modernizr.custom.js', get_template_directory_uri() . '/js/modernizr.custom.js', array(), '1.0', 'all', false);

    wp_enqueue_script('modernizr.custom.js'); // Enqueue it!

     wp_register_script('minicart.min.js', get_template_directory_uri() . '/js/minicart.min.js', array(), '1.0', 'all', false);

    wp_register_script('easy-responsive-tabs.js', get_template_directory_uri() . '/js/easy-responsive-tabs.js', array(), '1.0', 'all', false);

    wp_enqueue_script('easy-responsive-tabs.js'); // Enqueue it!

    wp_register_script('jquery.waypoints.min.js', get_template_directory_uri() . '/js/jquery.waypoints.min.js', array(), '1.0', 'all');

    wp_enqueue_script('jquery.waypoints.min.jss');

    wp_register_script('jquery.countup.js', get_template_directory_uri() . '/js/jquery.countup.js', array(), '1.0', 'all');

    wp_enqueue_script('jquery.countup.js');

    wp_register_script('jquery.flexslider-min.js', get_template_directory_uri() . '/js/move-top.js', array(), '1.0', 'all');

    wp_enqueue_script('move-top.js');

    wp_register_script('jquery.easing.min.js', get_template_directory_uri() . '/js/jquery.easing.min.js', array(), '1.0', 'all');

    wp_enqueue_script('jquery.easing.min.js');

    wp_register_script('bootstrap.js', get_template_directory_uri() . '/js/bootstrap.js', array(), '1.0', 'all');

    wp_enqueue_script('bootstrap.js');

}

 add_action('wp_enqueue_scripts', 'shoppy_stylesheets');

?>