Title: Difficulty With WordPress Function
Last modified: August 20, 2016

---

# Difficulty With WordPress Function

 *  [MountainTop](https://wordpress.org/support/users/mountaintop/)
 * (@mountaintop)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/difficulty-with-wordpress-function/)
 * I’m using the following code to display: Welcome, Username along with a profile
   link next to it. However, the profile link gets echoed over and over again. I
   found it under my branding div and blog title div in thematic. Anyone know why
   it is showing up all over the header?
 *     ```
       <?php
             if ( is_user_logged_in() ) {
             global $current_user;
             get_currentuserinfo();
   
             echo 'Welcome,  ' . $current_user->display_name . '!' . "\n";
             echo '<li><a href="/profile">Profile</a></li>'; 
   
             }
             else {
             wp_register();
             }
   
       ?>
       ```
   

The topic ‘Difficulty With WordPress Function’ is closed to new replies.

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [thematic](https://wordpress.org/support/topic-tag/thematic/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [MountainTop](https://wordpress.org/support/users/mountaintop/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/difficulty-with-wordpress-function/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
