WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] echo Category Slug? (3 posts)

  1. colosimo
    Member
    Posted 4 years ago #

    How can I echo the category slug while i'm on a single post?
    isn't there any <?php the_category_slug(); ?>

  2. DigitalSquid
    Member
    Posted 4 years ago #

    <?php
    $category = get_the_category();
    echo $category[0]->slug;
    ?>

  3. colosimo
    Member
    Posted 4 years ago #

    thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Topic