wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Automatically expire posts

wordpress snippet

Adding this PHP code to your wordpress theme will allow you to auto expire posts. This does not delete the post however it prevents the post from being displayed within the loop. Create a custom field key called expiration with a date formatted like this mm/dd/yyyy 00:00:00.

read more