I just started using Wordpress 3.0 to get a simple blog up and going. For now I am working with the default theme "Twenty Ten".
I want to make a simple change:
I'd like to modify the layout of the bloginfo( 'name' ), bloginfo( 'description' ), and php header_image() that appears at the top of the blog.
So, under Appearance, Editor, I select Header.php and I can see how this is being rendered.
It appears I can just modify this to my liking and I am good to go. (Correct?)
If so, my question is: is it considered proper practice to modify the html in header.php?
It seems to me that this is a bit dangerous, for example when it comes time to upgrade that same theme. How do I know which php files I have applied customizations to? Say I modify 6 php files, then an upgrade of the theme comes along...how does one handle re-applying these changes to the upgraded theme?
Is it a total "do over"?
Is there a better way to handle this scenario?
Maybe some themes are more powerful than others and can handle this type of customization more flexibly, and I should be searching for such a theme? Or, is there a reasonably proper and safe way to do this by directly editing the php files?
Implement custom template (static web - HTML) on WordPress
change the function wp_list_pages in wordpress
nginx error “ 504 Gateway Timeout”
Create a new folder in themes (name it whatever you want.
Best practices for displaying a webpage in different languages
How can I hardcode the Nextpage tag into a Wordpress theme file?
As long as you don't name it twentyten).
How to get rid of the “Leave a Comment” text in Wordpressa after deactivating “Allow comments”?
Create a style.css file in that directory and copy the whole style.css file from twentyten into it.
Find post categories or tags when editing a post
Then, change the theme name in the css headers and add this line after the tags:.
I have finished the layout design (html & css), what should i do to convert it to a wordpress theme
Then copy the header.php file over to another file in your directory, and edit to your heart's content.
If twentyten ever gets updated, you'll get the benefit of those updates (unless they're in css or the header) without losing your changes..
I think it's common practice (however, I've always just created my own themes from scratch).
Just give credit where it's due and don't pass it off as your own original work.. To avoid over-writing your customized theme when an upgrade comes out, you could save the customized one to a different folder in the themes directory with a different name, like
Twenty Ten Customized.
You can then copy or re-do the changes in the upgraded theme if you think the upgrades are worth the trouble.
There's no rule that says you have to have the latest version of the theme, after all.. There might be other themes that allow a high degree of customization without editing the php, but most of the time you'd have to edit the php I'd think.
(but I'm no pro theme developer.).
. I would not worry about updates to the actual theme because I don't think those ever really happen.
The last Wordpress default theme was Kubrick and, to my knowledge, it rarely was updated and most updates were minor and went unnoticed by most users.
If you go about customizing your theme, I don't think Wordpress is going to update the Twenty Ten theme to the point where you would ever wish that you hadn't edited the source because you wanted to upgrade to the new default theme.. If you don't want to actually edit any of the theme files, check out something like Thesis that allows you to customize most things from the admin.
. Note: I'm not aware of a free theme that offers a lot of customization options through the admin panel, but there might be something if you check around for a while..
rename the theme differently).
Modify header information in the
style.cssfile in your theme's root to do this.. Personally, however, if the theme already works for me out of the box, I think I'd most probably already be fine with that.
My website's running, the theme's working, and updating my theme may just break my site in ways I don't know.. I'd probably update it only for major security updates, but I'd probably be reading a changelog for that.
But if I was doing that, I'd know what files exactly were modified, and I can just manually do it myself.
Sounds like a lot of work, but better than my site buckling on me by some unknown cause..
I'd use Meld ( http://meld.sourceforge.net/ ) to do a three-way directory comparison (Original theme, upgraded theme, modified copy) to determine if any changes have been made that impact the parts you changed, as well as to merge the upgrade changes into your modified files..