Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block for date facet #3632

Closed
1 task done
YourMark opened this issue Sep 5, 2023 · 1 comment
Closed
1 task done

Block for date facet #3632

YourMark opened this issue Sep 5, 2023 · 1 comment

Comments

@YourMark
Copy link

YourMark commented Sep 5, 2023

Is your enhancement related to a problem? Please describe.

First off, thanks for this plugin and all your work on it. It really helps bringing ES to WordPress in a great manner.

Currently we have a setup where we use a custom search page in WordPress which uses Angular to get results from Elastic.

We are in the process of rebuilding this page using the ElasticPress widget blocks. For most part we have succeeded in the rebuild by using the taxonomy blocks.

However, one thing that we miss is the option to add a block can filter on post dates.

In our current situation there is an option to select one or more years the post must be from. For an example see below.

If this issue can be solved by the meta range facet, I might need some help 😉 I am not sure why, but available meta keys are not showing up in the dropdown (it stays grayed out).

Designs

This is an example of how it currently looks on our side, our custom solution that leans on Angular and which we are trying to reproduce with widget blocks.
image

Another idea or example could be a range slider with a minimum and maximum or 2 date pickers.

Describe alternatives you've considered

I have at this moment not experimented or considered any alternatives.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@felipeelia
Copy link
Member

@YourMark This is a feature that more people are asking for, so I've opened #3634 outlining the solution we'll aim to implement on ElasticPress 5.0. In the meantime, you can implement a new custom widget that simply applies those changes in the WP_Query directly. That would filter the results for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants