The WordPress documentation for Child Themes says:
Making a child theme is very simple. Create a directory, put a properly formatted style.css file in it, and you have a child theme! With a little understanding of HTML and CSS, you can make that very basic child theme modify the styling and layout of a parent theme to any extent without editing the files of the parent theme itself. That way, when the parent theme is updated, your modifications are preserved.
For this reason, child themes are the recommended way of making modifications to a theme.
The bold text is present in the original,
This is particularly true in the case of default themes like twentyeleven, which should never be modified except via a child theme.
Updates to a parent theme cannot ever, AFAICT, adversely affect the child as long as the child has been set up properly:
- The child’s style.css contains only the comment block, an @import statement and additional styles relevant to the child theme (i.e. it has not been copied from the parent).
- Only template files that will be modified in the child are copied into the child theme (and then modified).
- New template files for the child exist only in the child
- The child’s functions.php file (if it exists) consists only of new or overridden functions (i.e. the parent’s functions.php file has not been copied into the child.
Your worries are unfounded. There is no way that I can think of that the child and the parent can become incompatible. How could they be? What changes could be made to a parent template, css or functions.php file that would render the parent and child incompatible? The only possible contention that I can imagine would be if you had tried to override a parent theme function not protected by function_exists()
.
Finally, if you made changes to a child theme that resulted in the theme not loading correctly, then the problem was in the child—such as trying to override a non-overrideable function.
That’s as I see it, anyway.
PAE
Wow! That was very clear. Thanks very much for the answer. I just have one more question. And forgive me if it’s stupid, but, how do you edit such things as the chunk that says:
“Leave a Reply
Your email address will not be published. Required fields are marked *”
I just can’t find it in the code! Haven’t slept in all night trying to edit that and other text and can’t seem to find any of it. It doesn’t help either that I am not a too brilliant programmer…
No questions are stupid. If it’s puzzling you, the chances are it’s puzzling someone else as well.
As for the text associated with comments, in twentyeleven, the text is in the template file content.php. However, the default template for comments does not do things like mark required fields and the like. Perhaps you’re using a plugin for this, in which case the text you’re looking for will be in the plugin’s code.
Cheers
PAe
No, it’s not in the comments.php or any other PHP file in that folder. I used Adobe Dreamweaver to search through all the PHP files for words such as “Your email address” or “Required fields are marked”. It’s just not there. I even tried to find word by word ’cause WordPress themes sometimes fragment it and intercalate it with code.
As for the plugin, it’s just the default text that comes with wordpress. I have quite a few plugins at work but none doing the comments for me, I do want one tho. I’ve been looking for one for 10 days now but apparently either there isn’t such plugin or I am not using the correct keywords to search for it. I’d rather change it from a plugin’s control panel than mess with the PHP’s but can’t find one that will do it for me.
“Leave a Reply
Your email address will not be published. Required fields are marked *”
This text comes from WordPress core. Refer to the documentation for the comment_form()
template tag.
Woah… Sounds complex LOL. Is there a plugin that can change it? I wouldn’t like to mess with the code…
You shouldn’t ever mess with the core files unless you’re either a total super-guru or an idiot (only the first of which may be taken to refer to you, Chip). You just replace calls to core functions either with your own functions or with hard-coded values. If the function isn’t called, it doesn’t produce any output.
But if you don’t want to mess with code at all, you’ll have to live with what the WP team have given you.
The first paragraph may be something of an overstatement for dramatic effect, but I imagine you get the message.
🙂
Cheers
PAE
My programmer is sort of a guru in PHP, but he’s not familiar with WordPress. And yeah, I wouldn’t touch ANY file that has to be hard-coded. My forte is art. By the way, for those who are curious. Site’s done and here’s how it looks:
http://paranoidnews.org/
Thanks everyone for your help!! 😀