Skip Navigation

[Closed] Search for posts published between start and end dates

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 2 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2427609
스크린샷 2022-07-29 오후 2.42.27.png

Hello.

I'm trying to implement a search for posts published between start and end dates like the attached UI.

How to set Query Filter in View?
How do I write shortcodes in Search and Pagination?

please answer about my question.

#2427735

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Here is the doc about how you can build custom search using Toolset:
=> https://toolset.com/course-lesson/creating-a-custom-search/

Here is the doc about how you can build the text search using Toolset:
=> https://toolset.com/course-lesson/creating-a-custom-search/#style-the-search-box-and-results

I would like to know are you using blocks or classic views to build your custom search?

#2428133

I'm currently using the classic view.

#2428723

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Here is the doc that should help you to understand how you can build classic views:
=> https://toolset.com/documentation/legacy-features/views-plugin/front-page-filters/

You will have to add the custom field as views filter and use compare value as "number" and use "Between" clause for comparison.
=> https://toolset.com/documentation/legacy-features/views-plugin/front-page-filters/#vfmh-adding-search-controls

Please check the following screenshot: hidden link

Please let me know if you require further help.

#2429967
ui.png
search filter.png
Search and Pagination.png
Query Filter.png

Thank you.

Is there a way to implement it in the same form as the attached image?

There is no Post Date in Post Filter when New Filter is selected in Search and Pagination of View.

Please answer about my question.

#2430147

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I got it.

There is no feature to add publish date as frontend filter, so what you will have to do is as a workaround, you should add a custom date field namely "custom publish date" and copy the publish date value to this custom date field when yo save/update posts.

Then, later you should add a custom date field filter for this newly created date filed that actually holds the publish date. Will that work for you?

#2430813

Hello.

Thank you for answer.

How can I duplicate the Publish Date value into a custom date field?
Please let me know if there is a way to do it.

Please.

#2430941

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I would like to know how many posts you have already? if you have too many posts then we will require to build and run such script so that it will copy the publish date to custom field.

If you have only 5-10 posts then you can add the custom date field and set the date as publish date. If you already have too many posts then to build and run such script I will require admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

The topic ‘[Closed] Search for posts published between start and end dates’ is closed to new replies.