Blog Archives

Using PHP variables in JavaScript with wp_localize_script

There is many ways to pass dynamic variables to JavaScript. An easy way would be just to define the JavaScript variables in the <head> echoing the PHP variables. This will of course work, but there is a WordPress-way to do

Tagged with: , , , ,
Posted in Intermediate

WordPress Coding Standards

In a collaborative programming environment it is always good to have a set of coding standards that you follow. Thankfully, WordPress have coding standards which all developers should try to follow. If you peek at the WordPress source you will

Tagged with: , ,
Posted in Best Practices, Intermediate

Custom Post Type Best Practices

I have used Custom Post Types in almost every WordPress project I have worked on since the feature was introduced in WordPress 3.0. When collaborating with other developers you also come across some common mistakes, mistakes that I’ve also made

Tagged with: , , ,
Posted in Best Practices

Which variables are available in your template files?

When you are coding a theme you usually edit standard files such as index.php, single.php, page.php and so on. In these files you might have noticed that some variables are available even though you have not declared them. Such a

Tagged with: , , ,
Posted in Advanced

How to make WordPress print the date every time

If you are using the template function the_date or get_the_date while listing posts you might notice that the date doesn’t get printed every time. This is because the previous day is stored so that it doesn’t print the date stamp

Tagged with: , ,
Posted in Beginner

Never use PHP short tags for WordPress development

Today while working on a project where we had collaborated with freelance developers I noticed that some pages weren’t looking as they should. A quick glance at the code revealed that the developer was using “short tags” to include the

Tagged with: , ,
Posted in Best Practices, Misc
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 121 other subscribers