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,075 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