• Hi,

    Great plugin first!

    Just wanted to ask if you have thought of adding a year archive filter. So it can filter posts by years.

    If not, do you think it would be easy to implement?

    Thanks,
    Mariyan

    • This topic was modified 5 years, 5 months ago by ElectroN.
Viewing 2 replies - 1 through 2 (of 2 total)
  • This is exactly what we need too! I think we have to use custom taxonomy now, but we don’t know how to create a custom taxonomy. Hope we can get some help with this here!

    Not sure what you mean — do ou want to select by date/daterange of the post_date? That’s listed under the “types” (select, checkbox, radio, date, daterange) https://docs.designsandcode.com/search-filter/#examples

    But if you really want a custom taxonomy for year, then google that it’s easy (or use just that bit of my following link). So if it’s year-of-posting you need into that custom taxonomy, I’d look at https://geekgirllife.com/alphabetical-index-of-posts-in-wordpress/ — it reads the title, takes its first letter and uses that to index: That’s practically the same as what you want (read a date-time, save the year). This way you don’t have to manually (or SQL-wise) fill all these in, it reads them in whenever you create one (or change it!); and you can force it to read in all existing. [I’ve used this once, for alphabetizing.]

    In your specific case, you could consider two (or more) custom taxonomies: One for year, one for decade — so people can bunch per decade (if you have few entries) or whatever unit is sensible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter by Years’ is closed to new replies.