Theme Panel Changing Child and Parent CSS
-
I am using a theme’s panel to customize the style, etc. of my theme versus the standard WP Appearance > Customize menu. This works fine, except that when I created a child theme (by copying the style.css and functions.php to a new child folder) and made changes while the child was Active, it applied the changes to both the child and parent. Note that in the theme’s custom menu, it states at the top of the menu that the active theme is the child theme.
Is this normal, to be expected? Do themes’ custom panel/menus typically modify parent and child? Or did I set up my child wrong? I am a novice WP ‘developer’, i.e. I am learning as I build and do not have a foundation in the basics, so apologies if this is unclear or has an obvious answer. Cheers.
Below is the code for the functions and style files. Both files are located in \themes\journey-child with the parent under \themes\journey
Style.css
/* ---------------------------------------------------------------------------- Theme Name: journey-child Version: 2.1.0 Theme URI: http://themeforest.net/item/journey-personal-wordpress-blog-theme/12234742?s_rank=1 Author: Indieground Author URI: http://www.indieground.it/ Template: journey Description: Journey - Personal WordPress Blog Theme License: GNU General Public License License URI: http://themeforest.net/licenses/regular Tags: one-column, two-columns, three-columns, four-columns, custom-colors, custom-menu, editor-style, featured-images, full-width-template, theme-options, translation-ready Text Domain: ilgelo ------------------------------------------------------------------------------- */Functions.php
<?php function my_theme_enqueue_styles() { $parent_style = 'journey-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 ), wp_get_theme()->get('Version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); ?>
The topic ‘Theme Panel Changing Child and Parent CSS’ is closed to new replies.