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 Creating Your First Wordpress ThemeHere 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 Share your views: Post a Comment |
You are subscribed to email updates from Quick Online Tips To stop receiving these emails, you may unsubscribe now. | Email Delivery powered by FeedBurner |
Inbox too full? Subscribe to the feed version of Quick Online Tips in a feed reader. | |
If you prefer to unsubscribe via postal mail, write to: Quick Online Tips, c/o FeedBurner, 20 W Kinzie, 9th Floor, Chicago IL USA 60610 |
No comments:
Post a Comment
Keep a civil tongue.