Home / page / Generate QR Code for posts and pages
  • How to Generate QR Code for posts and pages


    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

    ( click code to copy )

    wordpress snippet : PHP

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

    ( WordPress codex functions, hooks, in this snippet. )

    the_title, the_permalink, wp,
  • 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?

    • 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

  • This is good!

  • This is good!

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