Resolved

When using a child theme, it appears that modifying theme colors via Stylebook doesn’t work.

4

Hi,

Looked through documentationand asked AI, but couldn’t find a satisfying answer.

I’ve created a basic child theme.
The contents of the style.css are:

/**
 * Theme Name: ProMokum
 * Template: greenshift
 * Text Domain: promokum
 */

Reason for me to do this is:
1) a custom theme name
2) have the option to add/override template-parts etc via code
3) have the option to safely update the parent theme when a new version arrives

Now i tried changing the theme colors via the stylebook, but when reloading, i still see the default colors.
When i now activate the greenshift theme and visit the Stylebook again, i do see the modified colors….
So they are stored somewhere in the DB i suppose, but not available to the child theme.

Is this a limitation of using a child theme?
Or is a bug maybe?
Or maybe some corrupt db entry, that i can clear/fix?

Looking forward to hearing from you.

Thanks!

Richard

richardvandenwinkel-com

Replies

Responses

  1. if you use Greenshift theme, this is wrong way of making child theme. Also in block themes, you don’t need to create child themes to override templates. Use Site editor, templates are stored on your site when you modify them via Site editor

  2. Thank you for your response.I’m aware that templates can be overwritten in the editor and are then saved to the database.But let’s say, i do want a child theme, what would be the right way for making that theme then?Because the way i’m used to do it, seems to not work with the theme colors settings, but maybe that’s just how it is???Looking forward to hearing from you.Thank you!

  3. richardvandenwinkel-com Avatar
    richardvandenwinkel-com
    Member

    Thank you for your reply.I know that website. Great source of information.I have read the page you did send me again.Still think i’m doing it the right way.From their website:

    I’ve tried both leaving out the text domain, setting it to the same as the parent and using a unique one for the child. Neither of those did solve the issue. Only activating the parent itself , solved it.Any idea to why this doesn’t seem to work then?I did manage to get it to work by first changing a color via the wordpress editor Appearance > Editor > Styles > Color.Now the color is shown in the Stylebook too and i can save there as well.