I've been making Wordpress styles for any couple of years and running into things I have to bear in mind when attempting to make my styles as compatible and versatile as you possibly can using their configurations, plug ins, etc.

It is possible to resource that looks after a record of all of the "don't does not remember" of Wordpress theming? What things would you attempt to bear in mind when building your Wordpress styles?

Good examples:

  • Checking when the author/admin has disabled comments for the publish.
  • Recalling to call wordpress_mind() in the finish from the <head> tag.
  • Recalling to call wordpress_footer() in the finish from the <body> tag.
  • Using bloginfo() variables rather than setting static values for charset, html type, description, etc. so admins can modify may be within the site configurations.
  • Using function_is available() before calling a function from the wordpress plugin therefore it fails beautifully in the event that wordpress plugin is not installed.

Wordpress documentation comes with an interesting subject addressing precisely what you are asking: it's known as Creating Styles For Public Release. Additionally, there are Theme Development General Recommendations. The Templates article is wonderful too.

I'm not sure other official assets, but it might be interesting to include more information into individuals three guides. I am thinking about another solutions we might have inside your question to fit them.

I am accustomed to Wordpress the good examples you authored just flows instantly when I am developing, since utilizing a function that results domain information for examplebloginfo() rather than static values is a great practice in a web design.

A style development record is dependent more about the intended audience for the theme. Whether it's past the fundamental blog and moving towards WordPress-as-Content management systems territory, you would consider:

  • custom icons and dynamic sidebars to create features more portable and versatile
  • support for custom fields, or plug ins like MagicFields that implement the first kind in another way
  • routing and creating custom templates for various quantity of a site (ex: sub-groups get handled by category-x.php)
  • utilizing a css framework so whomever reaches customize the styles includes a greater possibility of understanding it better make certain to incorporate ie support
  • custom wordpress-admin section using its own menus, pages, etc. this is particularly necessary in case your theme has custom functionality that may be further personalized through the user
  • make use of the wordpress_scripts and wordpress_styles classes and processes to include styles and scripts this is particularly essential for javascript, because it prevents duplicate includes and works together with dependency scripts (loads jQuery before your jQ script)
  • make certain the style of the theme does not look boring like anything else available for WordPress
  • write a style class unless of course you are likely to support PHP4, use PHP5 classes and objects to create your existence simpler, when it comes to feature inheritance with no naming conflicts. take a look at CodeIgniter as well as their singleton pattern it can make custom globals inside template files a great deal simpler to handle
  • if you're (and you ought to be) making your theme much more advanced and a lot more like a wordpress plugin, then know ways to use the Wordpress_Cache and Wordpress_Rewrite objects so that your custom queries with $wpdb (yes, you will need to do these every now and then to obtain certain custom functionality) are less costly, as well as your new pages (if you are spinning web addresses) route properly as well as your links are properly dynamically produced, correspondingly.
  • last and more importantly, try your toughest to split up presentation (html) from logic (php) this will get hard while you start running custom Wordpress loops and a great choice may be the aforementioned theme class.