WordPress.org

Forums

Attaching category names to blog entries (3 posts)

  1. wriedel2014
    Member
    Posted 9 months ago #

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

  2. janet4now
    still awesome :)
    Posted 9 months 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. alchymyth
    Forum Moderator
    Posted 9 months 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.

Reply

You must log in to post.

About this Topic