[Resolved] Make post goes off once deadline is reached

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.

This topic contains 5 replies, has 3 voices.

Last updated by willM-4 2 months, 3 weeks ago.

Assigned support staff: Minesh.

Author
Posts
#1587361

Hello,

We have created a custom post type and we have added a custom field called deadline which is a date.

Is there a way to make the post disappear once the deadline date is reached?

hidden link

pass: 123

#1587727

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

I assume we are talking about a custom date field "deadline" created with Toolset Types plugin.

You can add a custom field filter into view block:
Select items with field:
deadline is a number greater than TODAY()

If you are using Blocks Editor, you can edit the page you mentioned above:
hidden link
Find and select the view block, in the side bar, there is a section "Query Filter", add the filter as I mentioned above. See screenshot: query-filter.JPG

More help:
https://toolset.com/documentation/user-guides/views/date-filters/
Above document is using classic editor, the GUI is different from blocks editor.

#1589499

Hello,

I have a custom field deadline it is a date.

When I followed your instructions, all posts disappear, I tested a few combinations.

Can you check?

I have credentials on my very first post.

Thanks

#1589559

Minesh
Supporter

Languages: English (English )

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

Luo is on vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.

Can you please send me temporary wp-admin access details so that I will be able to access the admin and check what is going wrong with your view filter.

*** 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.

#1589585

Minesh
Supporter

Languages: English (English )

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

Can you please check now: hidden link

I've added the following Query Filter to your Block View's Query Filter tab on right side:

Custom field filter
Select items with field:
deadline is a UNSIGNED greater than TODAY()

Can you please confirm it works as expected now.

#1589725

My issue is resolved now. Thank you!