PHP Script Works in Header Template but NOT in WordPress Page (1 post)

  1. clanderf
    Posted 4 years ago #

    Hi, folks. I'm using a PHP script that displays the user's website (which they give when they register), and while the script works when it's pasted into the Header TEMPLATE, it does NOT work when it's pasted into any of my WordPress PAGES (and it doesn't work when it's posted to any page from any custom page template).

    Any idea what's going on? I've just tried pasting the PHP script between <div> tags when trying to paste it into one of my WordPress pages, but it's not working. Here's the code that I've been pasting into the WordPress pages:

    <?php global $current_user; get_currentuserinfo(); if($current_user->user_url) : ?><a href="<?php echo $current_user->user_url; ?>">HERE</a><?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic