WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove href from the_category (4 posts)

  1. younggogetter
    Member
    Posted 6 years ago #

    Hi there,
    I'm using a javascript hover plugin to display titles that are defined for hrefs. I've modified everything to have them only appear for one block of designated content.

    Unfortunately, I can't find where to remove "View all posts in..." title from the <?php the_category(',') ?> tag.

    Which file would that be located in?

  2. younggogetter
    Member
    Posted 6 years ago #

    Managed to fix it myself.

  3. rodageo
    Member
    Posted 6 years ago #

    Can you post how you fixed this for everyone else?

  4. rembrandt
    Member
    Posted 5 years ago #

    Instead of using the_category, you use get_the_category as follows

    <?php
    foreach((get_the_category()) as $category) {
        echo $category->cat_name . ' ';
    }
    ?>

    You can find more information at the url below to see other objects are available in the array.

    http://codex.wordpress.org/Template_Tags/get_the_category

Topic Closed

This topic has been closed to new replies.

About this Topic