The cool guys over at MobiFreaks needed an easier way to generate QR codes, so they began to search around for a new solution.
Originally, they would manually create a QR code for each and every article and add them to the post.
With the help of QR Server, they put together an awesome solution.
Check this out:
Generate QR Codes with QRserver
First, you simply pass the URL or text along with the API URL:
[cc lang=”php”]http://api.qrserver.com/v1/create-qr-code/?size=150×150&data=url-or-text[/cc]
Simply replace the “url-or-text” with just that — URL or text.
[cc lang=”php”][/cc]
This is what the above code renders:
Be sure you keep your dimensions completely square!
Now that you’ve done this, you can easily add this to any website (not just WordPress).
WordPress Loop
Adding this to the WordPress Loop is easy. We’re simply taking the simply concept established above and hooking into the magic of WordPress. I’m sure the same could be done with other CMS’. You could also play around with the formatting, too.
Here’s the snippet:
[cc lang=”php”]” alt=”QR Code for “/>[/cc]
Again, be sure to adjust the size (keeping it exactly square) to your liking.
[via MobiFreaks]
Mark Robinson says
So This is another example of misuse of QR codes.
When you think about it – Barcodes are a Print Medium not a screen medium.
If you are using your phone and see a website with a barcode you cant scan it because you are already viewing it on your phone. The whole nature of them is that they are supposed to be scanned by a device that reads them and will then bring you to that content not the other way around.
It makes no sense to have a barcode on a website at all. What does make sense is to have a barcode on a card, poster or printed advertisment as its purpose is to transition you from the print space to a digital one with minimum ease.
If I want to go from one digital space to another we can do that through this awesome thing called hyperlinks!
Mark Robinson says
Realise this may have sounded snooty – not intended to – no malice included – full of joy juice today!
Eric Dye says
Have another round for me!
Eric Dye says
I’ve often wondered the same.
Julian says
Hey, thanks for that. Do you have an idea why i doesn’t work with the_content?
Eric Dye says
Not sure. I would try poking around their website: http://qrserver.com/
There may also be a WordPress plugin that would work, too.