Start by posting a link to your site so someone can see what’s wrong with your child theme.
Something is not set up right – is the child theme on the same level as the parent theme (not inside it)? What is at the top of your child theme style.css file? (it should not be a copy of the entire stylesheet from the parent).
‘twentytwelve’ and ‘twentytwelve child theme’ are both folders in /themes, if that’s what you’re asking. my child theme is a copy of the whole parent theme, because I had made all of my customizations to the parent theme! When I switch back to the twentytwelve theme, though, everything reverts back to normal. Thank you so much for helping, I’ve wasted 2 hours confused and want to pull all my hair out!
What files did you change?
I know for sure stylesheet.css and probably the header, too.
So take everything out of the child theme EXCEPT style.css and header.php. Then change the name on the folder for the child theme – remove the spaces.
You must also have this at the top of the child style.css:
/*
Theme Name: Twenty Twelve Child
Template: twentytwelve
*/
@import url("../twentytwelve/style.css");
After you make those changes switch to another theme and then back to the child theme.
(Make sure you do not have the functions.php file in the child theme or you will crash the site.)
That worked! You’re a brilliant genius, thanks so much!
No problem – but ideally, you’d only keep the CSS changes in the child theme – so that you don’t have extraneous code in there…
Cute site, BTW :).
I’m having a similar sounding issue. I tried to set up a child theme for my site but kept getting a message that the child theme was broken (template was missing). Uncertain of what I was doing, I uploaded the template.css file to the child theme directory. That didn’t help, so I renamed the file template.php.
Well, the theme showed up and I activated it. No formatting. Realizing something was wrong, I quickly reactivated the main theme. Unlike the OP, and to my horror, there was no formatting there, either. Now I’ve simply lost all site formatting. I see all the same files are there, and I have changed none of them. I tried deleting the child theme folder entirely to no effect.
The site is zerogravitygym.com. The theme is kallyas.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
@haolekukini, that’s not a theme we support here. Try contacting your theme’s vendors for support with their products.
If they don’t provide support then consider switching to a theme we support.
Oh, ok, thanks. A general question though… the OP was advised not to put the functions.php file into the child theme or the site would crash. Crash in that sense is not the same thing as suddenly losing formatting is it? I just ask as I guess I put an essentially bogus .php file into the child theme folder.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Yes you’re not supposed to copy the functions.php file from the parent theme into the Child Theme, but that’s based on themes that follow general WordPress standards.
There’s no way of telling whether your theme follows these standards and therefore is compatible with Codex’s guidelines, as it has not gone through the theme review process at WordPress.org to enforce these standards.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
A crash would be getting a completely white page or a PHP error, not the same as losing format.
Perhaps something of interest… when I preview twentytwelve I get the same issue. The first thing on top of the page is */ …like there’s an open tag?
That’s the same with any theme I select now.