Skip to content

Instantly share code, notes, and snippets.

@billerickson

billerickson/functions.php Secret

Created Jul 27, 2017
Embed
What would you like to do?
<?php
function be_list_posts() {
$output = get_transient( 'be_list_posts' );
if( false === $output ) {
$output = do_shortcode( '[display_posts]' );
set_transient( 'be_list_posts', $output, DAY_IN_SECONDS );
}
echo $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment