CAT | Template Development
Most people want some sort of copyright statement at the bottom of their WordPress site and this usually includes the year. It makes sense to create this dynamically in PHP, rather than have to update it each year – let PHP do the work for you!
This is something I had to do the other day, and I pretty much put it on every WordPress theme I design in footer.php
Simply insert this PHP code where you want the copyright notice to appear – in the example it is simply styled with paragraph CSS tags, but you could use anything you want, for instance a CSS class.
<p>Content is copyright &copy; 2008-<?php echo date('Y'); ?> YOUR NAME HERE</p>
Shortcodes were properly introduced back in WordPress 2.5 – they are usually used in the post content area for doing all sorts of cool things, both with core code and plugins… but what if you need to call a shortcode OUTSIDE of a post (loop) in your template?
I’ve just found some really good information for WordPress plugin and theme developers on the WordPress Codex – looks like essential reading!
A new official WordPress theme website has been launched, which is based on the same format as the WordPress plugins repository. This is great news for WordPress theme developers as it provides a proper central resource for hosting downloads and responding to feedback.
Where it differs from the plugin repository is that they have streamlined the upload process for authors – so you don’t have to worry about Subversion (to quote the announcement post ‘our back end magic takes care of all that for you’ – good work guys! Automated checks are carried out when you upload the theme in a zip file, with error reporting – nice!
This also means that users don’t have to worry about nasty adware and links when using these themes – if they stick to the official WordPress theme repository they should avoid these potential problems.
When you start getting deeper into WordPress theme development, you will often have to reference images, includes and other files. To keep things tidy, you should keep all of these in the template folder. Then you can move your theme around different blogs and websites and all the paths will work.
It’s easy to generate your own custom pages and include any code you wish. Once created, you select which page template to use in the write/edit page sidebar.