Give an argument to the the_category tag. I have a long dash between the categories, and my tag reads <?php the_category(' –') ?>
You’ve got other problems, too, by the way. Your content is spilling over into the right sidebar (invisible in IE, because IE enlarges block elements to hold the content in them). Here’s a screenshot.
jeremywright : you screwed the design of this page !
Anyway, the solution is even more simple than that. Don’t touch the code, you simply need to modify your CSS accordingly.
ul, li {display:inline;}
That should fix it.
Sorry… Didn’t mean to screw the design
…
Here’s what I have now for the CSS:
.post-categories ul, .post-categories il {
display: inline;
margin: 0;
padding: 0;
}
Let me check the function now π
Ooh, that did it! Thanks!
Chiensavant is right of course. The css comes first (and it’s “li” not “il”, which is why it didn’t work). I just mentioned the tag because jeremywright mentioned commas as separators. I’ve forgotten what the default separator is, so in any case what I posted is where you change it to what you want.
whoops yeah, the mistype wouldn’t have helped. Either way I didn’t want LI’s. Working with the function is exactly what I wanted. Had to go digging a bit more to get the ones for archive and meta info, but got it in the end π
Don’t worry, it’s sorted. I noticed that the problems were caused by the linked items so I added the following to the CSS:
#commentlist ul , #commentlist li {
display: inline;
margin: 0;
padding: 0;
}
#comment ul, #comment li {
display: inline;
margin: 0;
padding: 0;
}
#commentlist ul a, #commentlist li a{
display: inline;
margin: 0;
padding: 0;
}
#comment ul a, #comment li a{
display: inline;
margin: 0;
padding: 0;
}
Not the best or neatest method, I’m sure, but it worked! :o)
Yes, the documentation on the WP wiki says that the_category returns an unordered list if you don’t specify a separator, and just the categories separated by the separator if you do.
I don’t understand your problem with the comments, though. Each comment has several paragraphs in it — block level elements. What do you want to display inline? It looks perfect to me as is.
I think it was sorted by the time you looked at it, serendipity. Thanks anyway.