- This topic is empty.
-
AuthorPosts
-
September 1, 2010 at 3:24 pm #30117
dannyj
MemberI recently built a site using the Thematic child theme. It relies heavily on the functions.php file. I’m a web design veteran but somewhat of a newbie WordPress coder. Is it a ok to use a blank theme that has the template files like header, footer, sidebar and add code directly to the templates? I’m not talking about modifying the core code but adding code, an image, a widget area directly to template files. Right now I’m finding it more of a task to add all the extensibility only to the functions.php file as Thematic does. I’d like to create a widget area using the functions.php file and add the code directly into the template file too. Maybe even add a div or image directly to the template code. —Is this OK in wordpress? Will I run into trouble when newer versions of wordpress or the theme come out?
September 1, 2010 at 4:22 pm #81247jamygolden
MemberYes it’s ok to do that and no I don’t think you’ll run into any trouble.
That is what creating a theme is all about – Manipulating the template files to achieve your goal.
September 1, 2010 at 4:29 pm #81248Luminated
MemberYou can definitely edit the template files without harming any possible future upgrades…that is really one of the best parts about the WordPress templating system! You can modify the functions.php and all the template files to your heart’s content without ever compromising the core WP functions. This is how the best WP sites are made.
September 1, 2010 at 4:38 pm #80793dannyj
MemberThank God. I like the Thematic framework but it is too purist feeling for me and a bit cumbersome for my WP level. I do much better getting into the template files themselves. Thank you.
September 1, 2010 at 4:52 pm #80794Chris Coyier
KeymasterThis is a good way to handle using a theme like Thematic and editing your own theme while leaving the core (and Thematic) alone.
http://codex.wordpress.org/Child_Themes
Make a new theme folder. Put the CSS comment from that link above into your own style.css file in that new theme. Change the “template” to point to the Thematic folder. Then put your own functions.php file in this folder as well. This theme folder (now a “Child theme”) has just these two files in it. You can now activate and use this theme, and 99% of it will be pulling and using stuff from Thematic, only your custom functions.php file be used as well, allowing you customize without overwriting anything.
September 1, 2010 at 5:18 pm #80791dannyj
MemberThanks, Chris. I recently built a child theme site using Thematic. It was a pretty steep learning curve for me. I was wanting to find a blank theme (for a new project) where I could physically add some widget areas to the theme template pages – create the function in the functions file and add the widget area to the template. It seems much less confusing to me rather than having everything in the functions.php file. Not knowing the WordPress rules very well yet, I wasn’t sure it was proper to add code directly to the theme template files themselves.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.