Support » Plugins » Hacks » Displaying 2 parent categories under post title

  • Hey there.

    So I have a bit of a complicated question, I want to achieve a color coded organized category posts.

    Basically this is what I want to achieve

    I want all my posts to be organized in two main places.

    There are the main “type” of posts

    -Mix Monday
    -The Good Stuff
    -New Release
    -Event reviews
    -Upcoming Events
    -New York
    -Album Reviews

    Then each post is also categorized by a music genre. All music genres are categorized by tempo. So it looks something like this:

    **glitch hop


    **drum and bass

    I want each of my posts to have whatever MAIN type of post it is and what tempo it is.

    Right now I have a code marked up to display one of the categories. I am not too sure which category is in which order, so I guess I would need help with that.

    $category = get_the_category();
    echo '<a>slug.'" href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';

    Keep in mind that each main category is a different color so two different colors should show up.

    Hope I could get some help!

  • The topic ‘Displaying 2 parent categories under post title’ is closed to new replies.