• Hi,

    Have created a child theme to Esteem:

    – The folder’s name: esteem-child (directly under the folder themes)
    – Created a style.css:

    `/*
    Theme Name: Esteem Child
    Theme URI: http://test-np-v2.nordicpickup.se/esteem-child/
    Description: Esteem Child Theme
    Author:
    Author URI:
    Template: esteem
    Version: 1.2.9
    Licence: GNU General Public License v2 or later
    Tags: Light, Vitt, Två kolumner, Sidopanel till höger,
    Sidopanel till vänster, Flytande layout, Responsiv layout,
    Anpassa sidhuvudet, Egen bakgrund, Anpassad meny,
    Egna färger, Klistrat inlägg, Trådade kommentarer,
    Stöd för språkfiler, Utvalda bilder, Temainställningar,
    Inläggsformat
    Text Domain: esteem-child
    */`

    – Created a functions.php (according wp.org’s instructions):
    a. Firstly:
    ` add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ ); function theme_enqueue_styles() { wp_enqueue_style( ‘parent-

    style’,
    get_template_directory_uri() . ‘/style.css’ ); }`
    b. Secondly:

    function theme_enqueue_styles() { $parent_style = 'parent-style'; 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 )); }
         add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

    c. Thirdly (this after another website I recently created where I faced problems with the connection to the child theme and
    finally got it to work):
    `add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ ); function theme_enqueue_styles() {
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array(‘parent-style’) );
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ ); }`

    – I have also inactivated caches (in WP Super Cache, wp-config.php and .htaccess) and deleted caches in web browsers.
    – Changes in Esteem’s mother stylesheet is working without any problems when testing so it’s obviously not a caching issue after all.

    So obviously, the web browser seems to pick up Esteem’s mother style.css and not the child theme’s style.css.

    Most thankful for your kind assistance!

    Best regards
    Cecilia

Viewing 3 replies - 1 through 3 (of 3 total)
  • At the moment the child theme looks deactivated.You can also use an import rule and avoid the php file if that is easier

    https://kovshenin.com/2014/child-themes-import/

    Thread Starter Cebe_tyr

    (@cebe_tyr)

    Hi,

    Many thanks for looking into the matter.

    According to wordpress.org’s instructions, I thought the @import-rule should not be used. That’s why I avoided it. It is much easier to use though… 🙂

    How can I activate the child theme, do you think? It should be activated by being created, right?

    I guess it has been ruled out by the custom CSS (Appearance/Design/Custom CSS). So there must be a rule in the actual theme (in this case Esteem) somewhere that deactivates the child, isn’t there? Do you know by any chance where and how I can inactivate that?

    Best regards
    Cecilia

    After you create your child theme you need to activate it from appearance>themes

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changes to child theme does not show on web site’ is closed to new replies.