Patrick
Patrick

Reputation: 159

Style PHP code WordPress

How do I make the following output in white text? span? div?

<?php global $current_user;
  get_currentuserinfo();
  echo 'Welcome, ' . $current_user->user_firstname . "\n";
?>

Upvotes: 0

Views: 57

Answers (1)

lngs
lngs

Reputation: 698

Try

echo 'Welcome,<span class="white-text">' . $current_user->user_firstname . "</span>\n";

css

.white-text{
 color:white;
}

you can either use span and div.

Upvotes: 1

Related Questions