Support » Themes and Templates » display only the category name

  • How can I display just the category name in a post? The tag
    <?php the_category() ?>
    displays it with a link and in a bulleted form which kinda messes up my layout…
    Hope anyone could help… Thanks! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mark (podz)


    Support Maven

    If we can have a link to your site, we can see your css and the context in which you are using the tag – and we can then give better advice 🙂

    Same questions, but I’m a different poster…
    on my template the (default) code is:
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    It generates the entire UL and LI tags. Where’s the HTML to edit? Can I just get a name?

    add this in wp-layout.css and you shoud get nice display

    .meta ul {
    padding: 0;
    display: inline;
    list-style-type: none;
    .meta ul li {
    display: inline;

    Is the search function broken?

    Thanks, I considered that, but I didn’t want my category name in a list of one. However, I found the function and I’m gonna try messing with it. Wish me luck!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘display only the category name’ is closed to new replies.