Home Forums Pro Themes Bizlight Pro custom child theme (Bizlight Pro) not working

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3803
    9toy
    Participant

    Dear Support

    Custom functions.php in child theme not work of Bizlight Pro not work for me

    When I create child theme and hooks below file steps as you suggest but,
    style.css in child theme -> works
    header.php in child theme -> works
    functions.php in child theme -> not works (Nothing changes)
    eg. http://themepalace.com/topic/add-a-second-tagline/

    What ‘s default value contained in file “functions.php” of child theme for Bizlight Pro.?

    #1

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }

    or #2

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        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')
        );
    }

    Thanks
    9Toy

    #3807
    wensolutions
    Keymaster

    @9toy, both approaches #1 and #2 above are correct. It is also a default code that should be in your functions.php before you activate your Child Theme. Either of the snippets above are optional, they load the parent style in your Child Theme through functions.php .

    #1 approach : loads parent style in your Child Theme. Your child theme’s stylesheet will usually be loaded automatically.

    #2 approach : If it is not, you will need to enqueue it as well. Setting ‘parent-style’ as a dependency will ensure that the child theme stylesheet loads after it.

    Make sure you have activated your Child Theme from your dashboard. Then all your custom functions will need to be added just below the codes.

    Learn more about creating Child Theme with default files and codes from below link.

    https://codex.wordpress.org/Child_Themes

    Hope this helps!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.