Generate QR Code for posts and pages

Start a WordPress blog with SIteGround Startup plan

Have you ever wanted to generate a Quick Response Code / QR code for a post or page of your wordpress website? Simply add this small snippet to the single.php of your wordpress theme in the location you wish to display the QR. To adjust the size of the QR post / page image just change the following within the src size=100x100.

QR:  wpsnipp.com

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

Comments  Leave a Reply

  1. Runned into this site a few day’s ago and are always carefull with registering and commenting else where. But i have to admit that this is a great recource for learing and understanding php. Thanks and keep up this knowledgebase..

  2. This is good!

  3. This is good!

  4. This is good!

  5. Thank You

  6. why should I generate a QR-code for a page/post I’m already on?

    1. For example, you’re using a page from your PC & with the QR Code, you can easily open the page on your phone without typing the url. Also helps in sharing post to sites.

  7. Great tip, thank you!

  8. Very useful, thanks for sharing

  9. How to automatically generate a QR code for your posts July 9, 2012 at 10:12 am

    […] to Kevin Chard for the tip! If you enjoyed this article, please consider sharing it! tweetmeme_style = […]

Add a Comment Cancel reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!