Morgan Kay
Member
Posted 9 months ago #
I'm creating a theme with custom taxonomies, and I would like for the taxonomy page to show the last date any item in that taxonomy was updated.
So I have a taxonomy called "genre", and one of the genres is "Comics." When a user views the archive for comics, I would like the top of the page to say "Last updated on ___" and show the last date when any post in the "Comics" genre was updated.
I get the feeling list_categories() is going to help me out here.... How should I do this?
Thanks!
security_man
Member
Posted 9 months ago #
the_date($post->ID) should work as long as it is out of the loop. when a category page is called the post data is there for the most recent post (if i remember right)
Morgan Kay
Member
Posted 9 months ago #
Hmm, that doesn't do anything at all. Perhaps it works differently in a custom taxonomy?
security_man
Member
Posted 9 months ago #
i may not have put the correct parameters in it, look at the function reference for the_date or get_date and it should give you the info you need
Morgan Kay
Member
Posted 9 months ago #
Ah, I fell victim to a classic blunder. :) the_date doesn't display if more than one post has been updated on a given day. the_time seems to be working.
Thanks!