Title: php code that generates register link
Last modified: August 20, 2016

---

# php code that generates register link

 *  [vnmember](https://wordpress.org/support/users/vnmember/)
 * (@vnmember)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-code-that-generates-register-link/)
 * Hello, which php code will generate register link when users are not logged it
   and give NOTHING when users are logged in. wp-register function gives a profile
   link when users are logged in and I do not want that.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Big Bagel](https://wordpress.org/support/users/big-bagel/)
 * (@big-bagel)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-code-that-generates-register-link/#post-2673352)
 * Something like this would do that:
 *     ```
       <?php
       if ( ! is_user_logged_in() ) {
           wp_register();
       }
       ?>
       ```
   
 *  Thread Starter [vnmember](https://wordpress.org/support/users/vnmember/)
 * (@vnmember)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-code-that-generates-register-link/#post-2673418)
 * Thanks, this works. Wonder if I can remove the listing style of wp_register using
   that code?
 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-code-that-generates-register-link/#post-2673420)
 * You can view the function in the core to see how you can create your own function
   to generate the registered link, so you can style it however you wish.
 * [http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/general-template.php#L319](http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/general-template.php#L319)
 *  [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-code-that-generates-register-link/#post-2673421)
 * To simply remove the listing style this can easily be done via the function parameters:
 * [http://codex.wordpress.org/Function_Reference/wp_register](http://codex.wordpress.org/Function_Reference/wp_register)
 *  Thread Starter [vnmember](https://wordpress.org/support/users/vnmember/)
 * (@vnmember)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/php-code-that-generates-register-link/#post-2673468)
 * thanks all for great support 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘php code that generates register link’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [vnmember](https://wordpress.org/support/users/vnmember/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/php-code-that-generates-register-link/#post-2673468)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
