Skip to content

cn2labs/wp-post-expirate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Arrr ye post is expired mate! 🦜

This is a small function to check if a WordPress post is expired. Copy the function to your themes functions.php and you're good to go.

Requires a custom 'expiration date' field for every post.

How to check for expired posts

Inside your loop add the following code:

// loop stuff
if (!post_is_expirate(get_field('name of your expiration date field'))):
  // display your post stuff
endif;

About

Arrrrr ye post is expired mate!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages