WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

I am wrapping html tags around the_title(); like

if(has_post_thumbnail()) { 
  the_post_thumbnail('home-thumbs');
   echo "<span class='home-title'>".the_title()."</span>"; 
}

But the the_title is printing above <span>, not like what i want. am i missing something? or doing something wrong?

share|improve this question

closed as off-topic by kaiser, tfrommen, toscho Nov 4 '13 at 1:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?" – kaiser, tfrommen, toscho
If this question can be reworded to fit the rules in the help center, please edit the question.

found the problem, the tags need to be inside the () like the_title('<span>','</span>')

share|improve this answer

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