Forums

Display ONLY category of current post (6 posts)

  1. CHUDSF
    Member
    Posted 2 years ago #

    I cannot figure this out -- need to display only the category of the current post on the index, no matter what category that may be. If anyone has any suggestions that'd be great.

  2. moshu
    Member
    Posted 2 years ago #

    Where on the index?
    What is it what you want to achieve? try to give more detailed info...

  3. CHUDSF
    Member
    Posted 2 years ago #

    Sorry, here ya go:

    On the index page of the blog, I would like to ONLY display the category of the most recent post. So if I post category 6, it should only display posts of that category. If I then do a post of category 3, it would no longer show category 6, only category 3. And so on...

    Basically the blog will have a rotating identity on the index page (I have a different header image for each category too), and this will keep older/different category posts from showing up there.

    Hopefully that makes more sense.....?

  4. CHUDSF
    Member
    Posted 2 years ago #

    That first sentence should say: Display only POSTS IN THE SAME CATEGORY as the current post.

  5. moshu
    Member
    Posted 2 years ago #

    Yes, it does.
    However, I don't remember any solution for this kind of "rotating" display of categories.

    This search also didn't bring up many useful threads;
    http://wordpress.org/search/display+last+updated+category?forums=1&p=2

  6. CHUDSF
    Member
    Posted 2 years ago #

    Anyone else have a good way to do this? Perhaps one can get the category of the current post and omit it from the loop using a variable somehow? My php is useless.

Topic Closed

This topic has been closed to new replies.

About this Topic