Post Pic

How to automatically generate a QR code for your posts

QR Codes are quite popular online theses days. Do you want to generate QR codes for all of your blog posts? Here is a very simple way to do it.

Copy the following code and paste it into your single.php file, where you want the QR code to be displayed.
If you also want to provide a QR code on pages, paste the code into page.php as well.

<img src="http://api.qrserver.com/v1/create-qr-code/?size=100x100&data=<?php the_permalink(); ?>" alt="QR:  <?php the_title(); ?>"/>

Thanks to Kevin Chard for the tip!

7 Responses

Jul 10 2012 00:59

this trip is very helpful thanxs alot

Jul 10 2012 22:11

Thanks for this one… found a pretty cool use we’ve shared with our members…

Aug 10 2012 14:16

Awesome! Thanks for the idea and the heads-up on how to implement :)

Aug 13 2012 07:38

Hi !

You can use Google Chart Tool like :

<img src="http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=&chld=H|0" />

Enjoy!

Aug 28 2012 05:57

Great Post. Very Helpfull. Would definitely make pages look professional.

Oct 27 2012 10:51

Is there a way to generate qrcode from php? Today, we need to speed up wordpress and remove many dns queries made linking externale resources.
Is it possible? I’m sorry for my bad english.

Mar 01 2013 13:15

Thanks a lot for the resource, i guess it will go a long way in promoting my posts.

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required

WP Theme of the week

Sponsored Likebox