Since I have a blog full of movie critics, I’d like to sort my posts by the date of the movie itself, not the date of publication. To do so, I have a taxonomy with a year per post and I’d like to sort the posts using this numeric information.
Unless I’m mistaken, there’s no integrated way of doing so. Am I right ?
One thing I didn’t think of, is that by default my posts would be sorted by weight, which I don’t want. I only want the weight sorting to be in place in certain places (like archives), and not on the index page.
So, if someone needs the same thing, here’s the code that works to force the listing by publication date :
Note that I have only read the documentation on this subject, but
annee_weight=2015 will override the default weight (date) for that taxonomy - so that would affect the default order on the list page (myhost.comt/annee/someannee).
Problem is, I’d like to sort posts on other archive pages (for example /acteurs/gerard-depardieu/) using the taxonomy annee. The idea, basically, is to have movies sorted by year.
But I don’t want this sorting feature on the index page, since it’s not only movies.
I think a standard weight and the code I posted earlier should work.