This is my style.css:
/*
Theme Name: PTBasketsChild
Template: ribosome
Version: 1.0.0
*/
.woocommerce-loop-product__title {
font-size: .5em;
}
.entry-title {
color: purple;
}
h1 {
color:purple;
}
And my functions.php
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
} ?>
The second question is since my child theme is loaded after the Woocommerce stuff (but before the Ribosome stuff), how is the child theme going to get priority over the Woocommerce file? Do I need a separate child theme for Woocommerce (as far as I can tell, I’m not using a theme of theirs)?
]]>For the first question, I have a feeling it could be the weight of the selectors. I do see it being applied but then it also has another that matches. I see this one:
.woocommerce ul.products li.product .woocommerce-loop-product__title {
padding: .5em 0;
margin: 0;
font-size: 1em;
}
As for the templates, not sure if you have seen their docs: https://docs.woocommerce.com/document/template-structure/
Hopefully that helps you out a bit.
]]>I’m now trying to do something really basic, just to get my css to be seen. I’m trying to change the entry-title with the name of my business to purple. I put as much specificity in as I could:
body #main #primary #content #post-11 .post-11 .entry-header .entry-title {
color: purple;
}
But when I look at the styles that are applied I don’t see my style.css in there anywhere (version 1.0.0). Shouldn’t it be listed and ignored if it is not being applied?
Thanks so much for your help. This is driving me crazy!
]]>#post-11
and .post-11
next to one another.
You could potentially use:
.home .entry-header .entry-title {
color: #c0ffee;
}
]]>
What concerns me is that while my style.css file is listed in the Head section of the page, no matter what I put in the css file doesn’t get reported when I “inspect” in the styles section. I would expect that if something were to be overriding my css, that I would still see my changes in the list of Styles that are applied to the element. My changes would be crossed out, and some other properties would be applied, but I think that I should at least SEE them in the styles tab. That leads me to think that there is something wrong in how I am including my files.
Currently:
/*
Theme Name: PTBasketsChild
Description: A child theme for Peggy Thrasher Baskets
Author: Peggy Thrasher
Template: ribosome
Version: 1.0.0
*/
.post-11 {
display: hidden!Important;
}
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
?>
At this point, I would be happy to be able to change anything, just so I would know that the child files are actually being used.
Thanks for your help
]]>I tried:
.post-11 {
display: none;
}
Resulting in an almost empty page.
]]>