• Resolved protasov

    (@protasov)


    I’ve been trying to create a child theme for the “bizpoint”. I’ve made several attempts to do so manually (following the directions for creating a Child Theme (https://codex.www.ads-software.com/Child_Themes), and also by using multiple Plugins designed to create them for you (example: Child Theme Configurator).

    No matter how many variations I try, when Activating the child theme, my main menu style is not preserved, and neither are my site’s fonts and typography.

    I’ve researched on Google and made sure to reassign the menu location, etc. but nothing seems to make any difference.

    There must be some style that is either not loading in the correct order or that is being missed. I’ve tried to keep things as simple as possible.

    Any thoughts would be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter protasov

    (@protasov)

    Well 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' );
    
    Thread Starter protasov

    (@protasov)

    Actually, 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' );
    ?>
    Theme Author SaltTechno

    (@salttechno)

    Hello,

    Thank you for using our theme and for updating the ticket with the solution.

    We are currently updating our documentation where we are adding a solution for creating the child theme.

    For others, who are looking for the help in creating a child theme, you can use above solution or there is a plugin available which can help you in creating a child theme. Link: https://www.ads-software.com/plugins/child-theme-configurator/

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child Theme Creation’ is closed to new replies.