ndiego / block-visibility

Conditional visibility controls for all WordPress blocks.
https://www.blockvisibilitywp.com
GNU General Public License v2.0
130 stars 10 forks source link

hide block if post published date is less than xx/xx/xxxx #112

Open swest opened 2 months ago

swest commented 2 months ago

What problem does this address?

I have an Author Block that is appended to the end of every post. I need that block to be hidden on posts with a published date before a certain date. How can I accomplish this?

What is your proposed solution?

I suppose this could be handled via posts meta and the addition of date comparison operators. So you could construct a visibility setting that would hide a block if the post published date is less than a certain date.

ndiego commented 2 months ago

Would it also be useful if you could set something like "X days since the post has been published"?