How to automatically generate a QR code for your posts

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!

Leave a Reply

Your email address will not be published. Required fields are marked *