Installing a Child Theme & editting the style.css

Hi,

I am trying to install the child theme and edit the style.css file. I left the functions.php file as default and the stylesheet is not loading as should be. It's taking quite a long time for the page to load, which might be because of some overriding issue. Can you help me sort it plz?


The code is here:

Functions.php File (Child Theme)

<?php
/**
 * Betheme Child Theme
 *
 * @package Betheme Child Theme
 * @author Muffin group
 * @link https://muffingroup.com
 */

/**
 * Child Theme constants
 * You can change below constants
 */

// white label

define('WHITE_LABEL', false);

/**
 * Enqueue Styles
 */

function mfnch_enqueue_styles()
{
    // enqueue the parent stylesheet
    // however we do not need this if it is empty
    // wp_enqueue_style('parent-style', get_template_directory_uri() .'/style.css');

    // enqueue the parent RTL stylesheet

    if (is_rtl()) {
        wp_enqueue_style('mfn-rtl', get_template_directory_uri() . '/rtl.css');
    }

    // enqueue the child stylesheet

    // wp_dequeue_style('style');
    wp_enqueue_style('style', get_stylesheet_directory_uri() .'/style.css');
}
add_action('wp_enqueue_scripts', 'mfnch_enqueue_styles', 101);

/**
 * Load Textdomain
 */

function mfnch_textdomain()
{
    load_child_theme_textdomain('betheme', get_stylesheet_directory() . '/languages');
    load_child_theme_textdomain('mfn-opts', get_stylesheet_directory() . '/languages');
}
add_action('after_setup_theme', 'mfnch_textdomain');

--------------------------------------------------
The style.css is pretty much empty, except for the initial description.

Comments

  • Hello,
    those are the steps.
    1. Update wordpress and the parent theme to the newest version.
    2. Download the childtheme from themeforest, and activate it.
    Then, any changes you make it the style.css file, will be reflected on the website.
    If you have any problems, there could be an issue with the plugins, which we suggest you disable for testing. Or you simply have CSS errors, and the code does not do anything.
    thanks
Sign In or Register to comment.