WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the QR Code Tag plugin and can't get this to work.

<img src="<?php 
global $qrcodetag; 
echo $qrcodetag->getQrCodeUrl('$_SERVER['PHP_SELF']',100,'UTF-8','L',4,0); 

I want a qr barcode to get the current url of the category or page or post in my theme.

share|improve this question
You try to use this code on wordpress.com? I don’t think that would work. – toscho May 27 '11 at 1:57
Nope, on my own install, and my host gives me access to all php functions. – sway May 27 '11 at 2:00
Okay, I removed the wordpress.com tag. – toscho May 27 '11 at 2:04

you can use $_SERVER['REQUEST_URI'] and add you domain before it so:

<img src="<?php 
global $qrcodetag; 
echo $qrcodetag->getQrCodeUrl($URI,100,'UTF-8','L',4,0); 

and change http://www.example.com to your domain.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.