Title: Getting Categories Inline
Last modified: August 18, 2016

---

# Getting Categories Inline

 *  [jeremywright](https://wordpress.org/support/users/jeremywright/)
 * (@jeremywright)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/)
 * Hey,
    For some reason, categories are showing up as
    - ‘s in my post info area (www.ensight.org). Where is this code created? I’d
      love to just modify it to be inline and with commas if there’s more than one…
      
      Thanks 🙂 Jeremy

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [serendipity](https://wordpress.org/support/users/serendipity/)
 * (@serendipity)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79730)
 * Give an argument to the `the_category tag`. I have a long dash between the categories,
   and my tag reads `<?php the_category('&nbsp;–') ?>`
    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](http://kastalia.free.fr/misc/ensightorg.jpg).
 *  [chiensavant](https://wordpress.org/support/users/chiensavant/)
 * (@chiensavant)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79731)
 * </div>
 *  [chiensavant](https://wordpress.org/support/users/chiensavant/)
 * (@chiensavant)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79732)
 * <div class=”threadpost”>
 *  [chiensavant](https://wordpress.org/support/users/chiensavant/)
 * (@chiensavant)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79733)
 * 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.
 *  Thread Starter [jeremywright](https://wordpress.org/support/users/jeremywright/)
 * (@jeremywright)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79736)
 * 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 
   🙂
 *  Thread Starter [jeremywright](https://wordpress.org/support/users/jeremywright/)
 * (@jeremywright)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79738)
 * Ooh, that did it! Thanks!
 *  [serendipity](https://wordpress.org/support/users/serendipity/)
 * (@serendipity)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79739)
 * 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.
 *  Thread Starter [jeremywright](https://wordpress.org/support/users/jeremywright/)
 * (@jeremywright)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79763)
 * 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 🙂
 *  [divrom](https://wordpress.org/support/users/divrom/)
 * (@divrom)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79776)
 * 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)
 *  [serendipity](https://wordpress.org/support/users/serendipity/)
 * (@serendipity)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79777)
 * 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.
 *  [divrom](https://wordpress.org/support/users/divrom/)
 * (@divrom)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79783)
 * I think it was sorted by the time you looked at it, serendipity. Thanks anyway.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Getting Categories Inline’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 4 participants
 * Last reply from: [divrom](https://wordpress.org/support/users/divrom/)
 * Last activity: [21 years, 10 months ago](https://wordpress.org/support/topic/getting-categories-inline/#post-79783)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
