WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why the disco funk this is happening I can't quite put my finger on - but I guarantee you it's because I'm probably missing some simple PHP best-practice:

<?php echo '<h3>' . sprintf(__('Welcome to %s', 'roots'), bloginfo('name')) . '</h3>'; ?>

For some reason outputs:

Site Name<h3>Welcome to </h3>

Any light nudges in the right direction would be really appreciated - and maybe a slap on the head once I figure out what's going on ;) Thanks!

share|improve this question
up vote 1 down vote accepted

Try using get_bloginfo() instead of bloginfo(). The former returns the value; the latter echoes the value.

share|improve this answer
Lowers head in shame... but gives @Chip a high-five. Thanks, really appreciate it! – Zach Dec 19 '11 at 19:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.