WordPress.org

Forums

Attaching category names to blog entries (3 posts)

  1. wriedel2014
    Member
    Posted 1 year ago #

    How can I attach one or more Category names to each of the items on my Blog page?

  2. janet4now
    still awesome :)
    Posted 1 year ago #

    Add this to your template files where you want it to appear:

    <?php
    foreach((get_the_category()) as $category) {
        echo $category->cat_name . ' ';
    }
    ?>
  3. Michael
    Forum Moderator
    Posted 1 year ago #

    is your blog with WordPress.com as the link on your user name suggests?
    if so, please ask at http://en.forums.wordpress.com/

    http://en.support.wordpress.com/com-vs-org/

    if your site is self-hosted based on WordPress.org, it might help if you can post the name of your currently used theme, to get more specific suggestions.

Topic Closed

This topic has been closed to new replies.

About this Topic