Support » Themes and Templates » Display only one category for a post

  • kr3t3n


    Hi, I read about a similar problem in the forums but the solution did not at all work for me.
    I am in the following situation: I have posts with up to 5 categories assigned to. When they are listed in home, index, categories, search pages etc. I want them to display only one of their categories (doesn’t matter which one, preferably random) because of design issues. Can anyone help me.

    the site is and I want to put the category in the place of the “No comment” sign on-top of the images.
    Another solution would be if I could get the categories to display after each other without creating a new line but making a list like this: “one, two, three”
    Right now, they go like this:

    Any suggestions?

    Thanks in advance guys!

Viewing 1 replies (of 1 total)
  • MichaelH


    Change to the WordPress Default Theme because it displays all categories for a post on one line. Look at how the wp-content/themes/default/index.php makes use of the template tag, the_category().

Viewing 1 replies (of 1 total)
  • The topic ‘Display only one category for a post’ is closed to new replies.