Wordpress Widget Issues
问题 I'm trying to use PHP to display a QR code for the current page. the_permalink() returns as blank on my Forums. function the_qrcode( $permalink ) { if($permalink == '') { $permalink = 'http://eternityofgamers.com/forums'; } echo $permalink; } In the PHP-enabled text widget, I have <?php the_qrcode(the_permalink()); ?> On the main page, $permalink is echoed as http://eternityofgamers.com/archives/74http://eternityofgamers.com/forums instead of http://eternityofgamers.com/archives/74 . 回答1: The