Add QR Codes with Google Chart API

Add QR Codes to each one of your posts by adding this code in your WordPress site’s single.php file in the place where you want the QR Code to appear. This code uses Google Chart API to create QR Codes for each post in your WordPress site or blog! Just that easy!

Use Google Chart API to generate unique QR codes for each WordPress blog post. Simply add the following code in the your single.php file where you want the QR code to appear.

Code Example:

QR code

QR Code Parameters

Here are the QR code parameters that you are changeable: – calls the Google Chart API
cht=qr displays the QR code option
&chs=100×100 determines the 100px square size
&chld=L|4 – default error correction level and margin (in rows). So want more white border around the code, increase the 4
php the_permalink info calls the permalink of the single post. Use the URL you want.

This will create QR codes that are 100px x 100px on your site. Change the 100px to 200px or the pixel size that works best for your WordPress site or blog. It is best keep your QR Codes at least 80px or larger so that the widest variety of smartphones will be able to successfully scan your QR Codes.

For your home page you could use this*:×300&cht=qr&chl=×150&chlt=qr&chl=http://yourDomainname

*NOTE: It is not good practice to place a QR Code on a website or page that is the destination of that QR Code unless there is added value such as a mobile version of your site with different extra content

Always include scanning directions and a hint of what added value will be received by scanning your QR Code!

Always scan your QR Code to make sure that it works the way you expect.

Tip: To print your QR Code on your marketing collateral, make a temporary version of your QR Code at least 300px x 300px. When you view your new QR Code, just right click to save and rename your QR Code image.



Search for QR Code Services at QRmedia.comCreate your own QR Code event or campaign. Search for and find the best QR Code Services at to help you with your next campaign or event. Search by the type of information you wish to encode or by the category of QR Code services you need.