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…
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…
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…
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…
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…
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…
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…