Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development Adding a Blog to a WordPress Theme Coding the Blog Homepage

Not echoing correctly

I'm using correct category tag as in video but it's showing it in wrong way which is: by jazib_shahzad inUncategorized onOctober 6, 2015. Here there is no space between "in" and "uncategorized". My code is:

<li class="cat">in<?php the_category( ', ' ); ?></li>

1 Answer

Jeremy Castanza
Jeremy Castanza
12,081 Points

Try this

<li class="cat">in&nbsp;<?php the_category( ', ' ); ?></li>

yeah it worked. problem was with space I put a space behind in