I tried to make a child theme to change some colors. I used this https://codex.wordpress.org/Child_Themes tutorial, but I still can't get this done. The problem is that I am not able to override some styles, because my stylesheet called "bootstrap.css" is not getting loaded. My functions.php file looks like this
<?php
function my_theme_enqueue_styles() {
$parent_style = 'maxstore_theme_stylesheets'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/css/bootstrap.css' );
wp_enqueue_style( 'child-style', get_template_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version'));
wp_enqueue_style( 'child-style', get_template_directory_uri() . '/css/bootstrap.css', array( $parent_style ), wp_get_theme()->get('Version'));
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>
These are the files that are getting loaded
EDIT 1: I'm now using this code and it still isn't working
<?php
function my_theme_enqueue_styles() {
$parent_style = 'maxstore_theme_stylesheets'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/css/bootstrap.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version'));
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/css/bootstrap.css', array( $parent_style ), wp_get_theme()->get('Version'));
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>
EDIT 2: My bootstrap stylesheet is getting loaded, but for some reason my website is still using another version of it. As you can see it uses 3 times the same styles and the one that is really used is version 3.3.4. and I want to use the one with the blue color which is version 1.0.2 Version 3.3.4 in the picture and I want to use the bootstrap version 1.0.2. EDIT 3: Code from functions.php that I am using at the moment
<?php
function my_theme_enqueue_styles() {
$parent_styles = array('maxstore_theme_style', 'maxstore_theme_bootstrap');
// This is 'twentyfifteen-style' for the Twenty Fifteen theme.
wp_enqueue_style( $parent_styles[0], get_template_directory_uri() .
'/style.css' );
wp_enqueue_style( $parent_styles[1], get_template_directory_uri() .
'/css/bootstrap.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() .
'/style.css', $parent_styles, wp_get_theme()->get('Version'));
wp_enqueue_style( 'child-bootstrap', get_stylesheet_directory_uri() .
'/css/bootstrap.css', $parent_styles, wp_get_theme()->get('Version'));
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
?>