0
 <?php 

function load_css(){
            
    wp_enqueue_style('bootstrap-cdn-css', 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css');
    wp_enqueue_script('bootstrap-cdn-js', 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js', 'jquery', false, true);
    wp_enqueue_style('my_style', get_stylesheet_directory_uri().'/style.css');           
}


add_action('wp_enqueue_scripts', 'load_css');      

In style.css, I have given body { color: orange; } it is not showing me orange color for heading in index.php, it means style.css not loaded correctly. and I want to load boostrap.js file for footer and style.css must work correctly. Could somebody help me to solve the error?

Warda
  • 1,226
  • 2
  • 11
  • 17
  • This sounds as-if `functions.php` is not executed at all. Try with only adding your style and also try with provoking a fatal error so you can check if it is loaded at all (e.g. throw an exception). – hakre Jul 18 '21 at 14:36
  • Thank you so much! @hakre i did the wrong file name `function.php` – Warda Jul 18 '21 at 14:43

1 Answers1

0

Wrong file name function.php. It is Functions.php. Problem solved. :)

Warda
  • 1,226
  • 2
  • 11
  • 17