/ Published in: PHP

Snippet to show a simple use of the transient API when querying posts.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$bandeau_post = get_transient('top1_bandeau_post'); 'posts_per_page' => 5 ); $bandeau_post = query_posts($args); set_transient('top1_bandeau_post',$bandeau_post,60*60*$timeout); } foreach($bandeau_post as $post) : setup_postdata($post); // the display code endforeach;
URL: http://www.mp2013.fr
Comments
