Skip to content

Instantly share code, notes, and snippets.

@lukecav
lukecav / functions.php
Created November 11, 2016 21:45
Expire posts to draft using a datepicker field in ACF
// Expire events
if ($expireTransient = get_transient($post->ID) === false) {
set_transient($post->ID, 'set for 1 minutes', 1 * MINUTE_IN_SECONDS );
$today = date('Y-m-d H:i:s', current_time('timestamp', 0));
$args = array(
'post_type' => 'events',
'posts_per_page' => 200,
'post_status' => 'publish',
'meta_query' => array(
array(
@stereokai
stereokai / gist:36dc0095b9d24ce93b045e2ddc60d7a0
Last active July 1, 2024 07:30
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: padding-box, border-box;
}