0
votes

I am using the radix starter theme and I am trying to add a child theme. In functions.php I have this code

`<?php

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css'           );
wp_enqueue_style( 'parent-style',          get_template_directory_uri().'/includes/css/bootstrap.min.css' );

}

It seems to load the style.css file but it is not loading the bootstrap.css or maybe the bootstrap java script file. Do I need to add the uri for the javascript file?

I have tried to add this

wp_enqueue_script('parent-style', get_stylesheet_directory_uri().'/includes/js/bootstrap.min.js');

I can tell it is not working as the navabar is not working with regards to mobile toggle etc.

Hope you can help thanks

1
You need to enqueue all javascript and css file you want to use.Prafulla Kumar Sahu

1 Answers

0
votes

change bootstrap style handle and add ver solved problem LIKE this script

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css'           );
    wp_enqueue_style( 'child-style',          get_template_directory_uri().'/includes/css/bootstrap.min.css', array( 'parent-style'));
}