Title: Displaying Categories
Last modified: August 19, 2016

---

# Displaying Categories

 *  [moessap](https://wordpress.org/support/users/moessap/)
 * (@moessap)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/displaying-categories-2/)
 * I’m trying to display categories in my sidebar but am having trouble.
 * I know there’s a widget that does it, but I like to edit the style of text etc
   and the widget won’t let me do that.
 * So I can display categories by using
 * <?php the_category(‘ ‘); ?>
 * but that only displays the categories of the most recent post.
 * So I tried using
 * <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_category(‘‘);?
   > <?php endwhile; else: ?> <?php endif; ?>
 * but that displays categories multiple times.
 * Is there something like <?php the_category(‘ ‘); ?> I can use to display all 
   categories at all times?
 * Thanks!

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

 *  [ryans149](https://wordpress.org/support/users/ryans149/)
 * (@ryans149)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/displaying-categories-2/#post-1219348)
 * [http://codex.wordpress.org/Template_Tags/wp_list_categories](http://codex.wordpress.org/Template_Tags/wp_list_categories)
 *  Thread Starter [moessap](https://wordpress.org/support/users/moessap/)
 * (@moessap)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/displaying-categories-2/#post-1219366)
 * Ok great thanks.
 * So I set it up so there’s no title so I could make my own… like this.
 * <?php wp_list_categories(‘title_li=0’); ?>
 * But it’s defaulted so each category comes up with an arrow beside it. To remove
   it it says:
 * “If you don’t want list output at all, set the style parameter to none.”
 * But I’m not sure how I add the style parameter in there. Any help?
 * Thanks again.

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

The topic ‘Displaying Categories’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [moessap](https://wordpress.org/support/users/moessap/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/displaying-categories-2/#post-1219366)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
