wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Generate QR Code for posts and pages

wordpress snippet

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=100×100.

QR:  wpsnipp.com

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

Did you like this post? If so please share it with your friends. Thanks!

  • Pingback: How to automatically generate a QR code for your posts()

  • sandrine

    Very useful, thanks for sharing

  • TheoRW

    Great tip, thank you!

  • stk

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

    • http://www.wwefansnation.com/ Hardeep Asrani

      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.

  • samito

    Thank You

  • http://www.shovan.co.uk/ Mr S

    This is good!

  • http://www.shovan.co.uk/ Mr S

    This is good!

  • http://www.shovan.co.uk/ Mr S

    This is good!

  • Tape Roll

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