Sponsor

2008/09/02

Quick Online Tips

Quick Online Tips

Link to Quick Online Tips

12 Essential Tips to Build Your First Wordpress Theme

Posted: 02 Sep 2008 01:10 PM CDT

Guest article by Sandip Dedhia from BlogsDNA
I always wanted to contribute to the wordpress community by building a Wordpress theme and releasing it to public. After efforts of 20 days I just managed to finish my first Wordpress theme. It was a great learning experience for me. During this process I ran into several issues, and it took considerable time to get it solved.

Creating Your First Wordpress Theme

Here I am listing some important points which you need to keep in mind before starting to build your own Wordpress theme, which might save you from such issues.

1) If you are not an experienced PHP developer, then don't start from scratch, instead take default or classic theme to start building your own Wordpress theme.

2) Get your index.php file perfect as this is the most essential file you require in your Wordpress theme, rest of the files are optional. Also you need little code change in your index.php file to get the rest (category.php, archive.php, single.php etc.) of Wordpress theme files.

3) Always start with the new and latest installation of Wordpress while building your theme. It happened that I used my old existing Wordpress blog which had several edited core Wordpress files and as soon as I tried to use the developed theme on the newly created Wordpress blog, I ran into unexpected behavior and it took me several days to find out what went wrong.

4) Keep modular code as this will save your lots of time and effort while integrating your style code with PHP code.

5) Generically use PHP echo statements to find out which code is responsible for a particular output. But don't forget to remove those echo statements at the end.

6) Don't ever hardcode any URL, Variables values, Image path inside your Wordpress theme if you are planning to release this theme for the public.

7) Wordpress Template Tags are great time savers to theme developers as they always experiment with various tags to get the desired behavior.

8 ) There are several sites which provide big lists of Wordpress Loops. Do check out those lists and try to reuse available code as much as possible as this will save lots of development time.

9) If you have reused any code from any other theme or website, do check whether that code includes any deprecated functions/Template tags. Try to avoid using them and replace with alternate Functions/Template Tags.

10) Don't include unnecessary PHP code, white spaces and blank lines in your Wordpress theme. This makes your theme heavy and leads to slower loading of pages. Take extreme care of white space before the start and end of php code tag, since it will result in those "Header already sent" nasty php warnings.

11) At the end if things go out of control, don't fear to ask your question at Wordpress codex community

12) "Lesser the php code, fewer the database calls, faster the response time" keep this mantra in your mind.

Trust me you don't need to be expert in PHP to build a Wordpress theme. We have great resources available at Wordpress official website. Do read the Theme Development guidelines on Wordpress.org before proceeding to theme development. I hope above points will be helpful to all the bloggers and developer who are planning to build their own Wordpress theme first time.

This guest article is written by Sandip Dedhia from BlogsDNA. where he blogs about Technology, Web 2.0, Linux, Gadgets and Blogging Tips. Got some tips to share, you can also write a guest article on QOT.

Related
» Wordpress 2.0 Theme Competition Winners
» Install WordPress Widgets Plugin by Automattic
» 4-Column Wordpress Themes for High Resolution Wide Screens
» Sponsor Wordpress Themes : Paid Footer Text Links Ads
» BloxPress : Ajax Powered WordPress Theme

Share your views: Post a Comment
Copyright 2008. Quick Online Tips. All Rights Reserved.

No comments:

Post a Comment

Keep a civil tongue.

Label Cloud

Technology (1464) News (793) Military (646) Microsoft (542) Business (487) Software (394) Developer (382) Music (360) Books (357) Audio (316) Government (308) Security (300) Love (262) Apple (242) Storage (236) Dungeons and Dragons (228) Funny (209) Google (194) Cooking (187) Yahoo (186) Mobile (179) Adobe (177) Wishlist (159) AMD (155) Education (151) Drugs (145) Astrology (139) Local (137) Art (134) Investing (127) Shopping (124) Hardware (120) Movies (119) Sports (109) Neatorama (94) Blogger (93) Christian (67) Mozilla (61) Dictionary (59) Science (59) Entertainment (50) Jewelry (50) Pharmacy (50) Weather (48) Video Games (44) Television (36) VoIP (25) meta (23) Holidays (14)

Popular Posts