Blog Archives

2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog. Here’s an excerpt: 4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 22,000 views in 2012. If each view were a film, this

Posted in Uncategorized

“Human readable” date

Here’s a short code snippet you can use if you want your date to be displayed as “Today”, “Yesterday” or “X days ago”. To accomplish this, simply add a filter to the_date. In my example it shows “X days ago”

Tagged with: , ,
Posted in Beginner

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

Use _n to write a phrase in single or plural form

If you would want to write a phrase in single or plural form depending on a number, there is a very handy function for it written in WordPress called _n. The function also takes a $domain argument which can be handy when

Tagged with: , , , , ,
Posted in Best Practices, Intermediate

Remove title attribute from WordPress images

I use default WordPress functions to insert images very often. Functions like the_post_thumbnail or wp_get_attachment_image are used in almost every project I do. By default WordPress adds a title to all of the images printed by these functions, and the title usually

Tagged with: , , , , ,
Posted in Intermediate

Different headers and footers using the $name argument

Both the_header and the_footer functions except a $name argument which allows you to specify other headers than the default header.php and footer.php. Example: WordPress would then look for header-special.php in your theme directory. If you want to specify a different

Tagged with: , ,
Posted in Beginner

Modifying the billing and shipping fields in Jigoshop

I recently discovered Jigoshop. A very nice, lightweight and well coded e-Commerce plugin for WordPress. After some experimenting I found that the checkout and it’s fields for billing and shipping information where defined in the code and could not be

Tagged with: ,
Posted in Advanced
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 120 other followers