Forums

Show category name only once @ home (5 posts)

  1. fooentes
    Member
    Posted 1 year ago #

    Hi there, I was wondering if there's a way to show category name only once if there's a sequence of two or more posts in the same category @ home.

    Example
    I want to turn this:

    • Post 1 (category A)
    • Post 2 (category A)
    • Post 3 (category A)
    • Post 4 (category B)
    • Post 5 (category B)

    into this:

    • Post 1 (category A)
    • Post 2
    • Post 3
    • Post 4 (category B)
    • Post 5

    does anyone know how to do it?
    thanks!!

  2. fooentes
    Member
    Posted 1 year ago #

    anyone???? :)

  3. MAS
    Member
    Posted 1 year ago #

    use get_categories() and query_posts() functions. see the codex in WP site.

  4. rayholt
    Member
    Posted 1 year ago #

    I'm trying to figure out how to do the same thing but instead of on the home page on tag.php and having it display only the posts that are relevant to the particular tag retrieved from have_posts().

  5. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic