Changes to child theme does not show on web site
-
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: https://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
- The topic ‘Changes to child theme does not show on web site’ is closed to new replies.