[Resolved] Creativix Child Style Issues
Laughing Squid hosting
We really like the way this theme looks and feels. Here’s the current appearance.
Our previous mistake we made was making changes to the parent style.php and style.css without constructing a working child theme first.
WP-Creativix Child: Stylesheet (style.css)
/* Theme Name: WP-Creativix Child Template: wp-creativix Version: 1.0 Author: Eric Abbott */ etc.
We did, however, want to save our styling changes after-the-fact. We noted this article, and this post, and a few other posts from the 351 posts returned by searching by “creativix child theme”. However, when we created our style.css within the child directory (and installed it), further changes to our child theme file did not take effect. We tried creating a child functions.php file like the above post suggested, but this action broke our site, and displayed an empty white browser.
We have footer.php, header.php, and style.css file present in the child directory. (Eventually, we intend to “cut out” our specific changes to these *.php files for a specific functions.php file in our child directory. Is this method correct?
Does the lack of child CSS inclusion have something to do with the path that is called by the template files? That is to say:
The problem, most likely, is that the <link> tag for “style.css” in the document head is using get_template_directory_uri(), rather than get_stylesheet_directory_uri(). If this is the case, then the Child Theme will never have its own stylesheet loaded, because get_template_directory_uri() returns the URL for the *template*, i.e. the Parent Theme. Thus, if this is the case, you’ll need to add “header.php” to your Child Theme, so that you can change this reference.
We added this line directly under the <head> tag of our child header.php file:
<link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
Our last question now while understanding that the child style sheet should load last and override the parent style. When the “inspect element” feature is viewed the last style link is our style.css. Is this correct?
Eric & Barb
- The topic ‘[Resolved] Creativix Child Style Issues’ is closed to new replies.