WordPress Quick Tips

Archive for February 2010

Use WordPress functions to include your CSS

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 [...]

Use an empty action attribute in forms

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 [...]

Make use of the body_class function

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 [...]

Make .htaccess and other hidden files appear in the Finder

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 [...]

Remember to use the Shortcode API

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 [...]

Custom CSS class for your menu items

Posted by: Vincent on: February 4, 2010

When using the wp_list_pages function in WordPress you get a generated list of your WordPress pages. To be able to style them, the items get several CSS classes. Example: These classes work in most cases, but in thoose cases they don’t you can change the class by using the filter page_css_class. The function accepts two [...]


About

WordPress Quick Tips is a blog supplying great tips about WordPress.

We hope to create a great knowledge resource for WordPress developers as well as serving a reminder for all the forgetful ones.

The blog is created and run by Vincent of Oakwood Creative

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 86 other followers

Follow

Get every new post delivered to your Inbox.

Join 86 other followers