Skip to content

Instantly share code, notes, and snippets.

@mbuckbee
Created December 19, 2010 19:34
Show Gist options
  • Select an option

  • Save mbuckbee/747627 to your computer and use it in GitHub Desktop.

Select an option

Save mbuckbee/747627 to your computer and use it in GitHub Desktop.
How to Add a Secret QR Code to your blog posts
<!-- Place in your header after your current CSS declarations -->
<style type="text/css" media="screen">
#qrcode{display: none;}
</style>
<style type="text/css" media="print">
#header, #sidebar, #respond, .social-bar, .author-links, #footer, #comments{display: none;}
#qrcode{display: block;}
</style>
<!-- Place after the footer on your webpage -->
<div id="qrcode">
<img src="http://chart.apis.google.com/chart?chs=150x150&cht=qr&chl=<?php the_permalink(); ?>&choe=UTF-8">
<div>
<p>URL: <?php the_permalink(); ?></p>
<p>Scan the QR Code to automatically load the page in your web browser.</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment