protasov
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Themes and Templates
In reply to: [bizpoint] Child Theme CreationActually, after seeing a few more problems, the slicknav menu wasn’t working properly on mobile. More tinkering, and I think I finally solved it…order is important:
<?php function my_theme_enqueue_styles() { $parent_style = 'bizpoint-style'; // This is 'bizpoint-style' for BizPoint theme. wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css' ); wp_enqueue_style( 'owl-carousel', get_template_directory_uri() . '/css/owl/owl.carousel.css' ); wp_enqueue_style( 'owl-carousel-theme', get_template_directory_uri() . '/css/owl/owl.theme.default.css' ); wp_enqueue_style( 'slicknavcss', get_template_directory_uri() . '/css/slicknav.css' ); wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); ?>Forum: Themes and Templates
In reply to: [bizpoint] Child Theme CreationWell I finally figured it out on my own….turns out that my child theme “functions.php” needed to be expanded to include several of the items that are in the parent functions.php. My final version looked like the following, and it is now working correctly:
<?php function my_theme_enqueue_styles() { $parent_style = 'bizpoint-style'; // This is 'bizpoint-style' for BizPoint theme. $bootstrap = 'bootstrap'; // This is 'bootstrap' for BizPoint theme. $owlcarousel = 'owl-carousel'; // This is 'owl-carousel' for BizPoint theme. $owlcarouseltheme = 'owl-carousel-theme'; // This is 'owl-carousel-theme' for BizPoint theme. wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( $bootstrap, get_template_directory_uri() . '/css/bootstrap.css' ); wp_enqueue_style( $owlcarousel, get_template_directory_uri() . '/css/owl/owl.carousel.css' ); wp_enqueue_style( $owlcarouseltheme, get_template_directory_uri() . '/css/owl/owl.theme.default.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
Viewing 2 replies - 1 through 2 (of 2 total)