WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] show category without linking? (3 posts)

  1. indiaberry
    Member
    Posted 7 years ago #

    I have not found this in the search yet. I did search.
    Here is what I would like.
    I would like for the <?php the_category(', ') ?> to not go to a link. I don't mean that I want to delete any category. I want the name of category to show but I don't want it to be linkable, like if someone click on the category name, it wouldn't go anywhere. It would be just like any other text. I have no problem with it being linked in the side bar but what I do mind is that it is being linked in the post, next to the time and comment.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Huh. I've never considered how to do such a thing.

    This might work:

    echo strip_tags(get_the_category_list(', '));

    Just use that instead of the_category..

  3. indiaberry
    Member
    Posted 7 years ago #

    Thank you. This work for me.

Topic Closed

This topic has been closed to new replies.

About this Topic