Created Date Facet on Year

  • Stefan
    Participant
    4 months ago #45166

    I would like to add a facet, dropdown, with the years of the publish_date. So i can filter by all results from 2024 for example.
    How could i achieve this without adding an ACF Field where I enter the year, but using the publish_date from the post?

    wpsolr
    Keymaster
    4 months ago #45176

    You can index a dynamic custom field that will contain a value based on your own code, by using a hook.

    Once you’ve reindexed your data, you can select the new custom field in you facets.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.