Title: Adding URL code within an echo command
Last modified: August 20, 2016

---

# Adding URL code within an echo command

 *  Resolved [HorrorUK](https://wordpress.org/support/users/horroruk/)
 * (@horroruk)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/adding-url-code-within-an-echo-command/)
 * Hi,
 * I have a plugin that doesn’t quite do what I want. If a user isn’t logged in,
   it tells them they need to log in, but doesn’t give a link, so I’d like to add
   the link.
 * This is the original code:
 * `elseif (!is_user_logged_in()) echo "<p>If you want to add yourself to this blog,
   please log in.</p>";`
 * I tried the following, but it gave a 500 error:
 * `elseif (!is_user_logged_in()) echo "<p>If you want to add yourself to this blog,
   please <a target="_blank" href="/">log in</a> or <a target="_blank" href="/wp-
   signup.php">sign up to the network</a> then refresh this page.</p>";`
 * Is there a way in which I can do this?
 * Thanks.

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

 *  [bythegram](https://wordpress.org/support/users/bythegram/)
 * (@bythegram)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/adding-url-code-within-an-echo-command/#post-3079066)
 * I’m pretty sure you could do this by changing the ” to ‘ for the echo:
 * `elseif (!is_user_logged_in()) echo '<p>If you want to add yourself to this blog,
   please <a target="_blank" href="/">log in</a> or <a target="_blank" href="/wp-
   signup.php">sign up to the network</a> then refresh this page.</p>';`
 *  Thread Starter [HorrorUK](https://wordpress.org/support/users/horroruk/)
 * (@horroruk)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/adding-url-code-within-an-echo-command/#post-3079101)
 * Thanks bythegram, that did the job perfectly.
 * Sometimes it is better to look for the simple solution first 🙂

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

The topic ‘Adding URL code within an echo command’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [HorrorUK](https://wordpress.org/support/users/horroruk/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/adding-url-code-within-an-echo-command/#post-3079101)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
