Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created July 27, 2017 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/b5d342f3f3fb1dbc484344495a76d92c to your computer and use it in GitHub Desktop.
Save billerickson/b5d342f3f3fb1dbc484344495a76d92c to your computer and use it in GitHub Desktop.
<?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