WordPress.org

Ready to get started?Download WordPress

Forums

display only the category name (6 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    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! :)

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    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 :)

  3. Anonymous
    Unregistered
    Posted 9 years ago #

    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?
    http://www.anthonymorales.com/new

  4. Joshua Sigar
    Member
    Posted 9 years ago #

    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;
    }

  5. Beel
    Member
    Posted 9 years ago #

    Is the search function broken?
    http://wordpress.org/support/5/15563

  6. Anonymous
    Unregistered
    Posted 9 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.