Posted by: Vincent on: February 21, 2010
When I’m not developing for WordPress, I try to use a specific folder structure for my project. I have all my .css-files in the /css/-folder, all JavaScript in /js/-folder and so forth. I tried to keep this up for WordPress, and placing my CSS in the root instead of the theme folder, but this quickly [...]
Posted by: Vincent on: February 17, 2010
When developing a simple form to use in your WordPress theme or plugin you often want to post to the same page. To do so, simply leave the action attribute empty in your form. Notice that your_name is used, using simply name as the attribute value may cause some trouble. At least it did for [...]
Posted by: Vincent on: February 11, 2010
The function body_class was introduced in WordPress 2.8 and should be included in every theme. Include it in your HTML like so: And you will end up with something like this It can come quite handy when you want pages to have different color themes for example. Just like the classes in your navigation, the [...]
Posted by: Vincent on: February 10, 2010
When developing in a Mac OS X environment you quite often find yourself wondering why some files doesn’t show up in Finder. If you’re developing for WordPress, you might wonder where your .htaccess file is. This is because Mac OS X hides Unix files. To show hidden files in Finder, open up the Terminal and [...]
Posted by: Vincent on: February 8, 2010
The Shortcode API is an excellent way to embed HTML code in your posts and pages without much effort from the user. In a recent project we had great use of the Shortcode API when we needed parts of our content styled inside a box. Simple enough for the shortcode! We wanted something like To [...]