• Hello, I have been stumped for a few days on a perfect way to display the posts using my custom post type (track) and the taxonomies ( genre, sub_genre). When a user goes to http://sitename.com/genre/”sub_genre name” , i want all posts of that sub_genre to be categorized by those sub_genre taxonomies with content.
    ex..
    http://sitename.com/genre/hip_hop
    Genre: West
    junior test track

    Genre: Old School
    Song 3 track
    Rap title track
    Song 2 track

    This is kind of working but its looping all wrong…

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Its seems to be going through the foreach as many times as there are actual posts in the genre taxonomy rather than the sub_genre.

    ex.

    Genre:West
    junior test track

    Genre:Old School
    Song 3 track
    Rap title track
    Song 2 track

    Genre:Old School
    Song 3 track
    Rap title track
    Song 2 track

    Genre:Old School
    Song 3 track
    Rap title track
    Song 2 track

    Any help Please Please Please would be appreciated. My php skills are not the best and the loop is making my brain hurt a little.

The topic ‘Taxonomy posts on Archive page’ is closed to new replies.