Comments on: Back to the future with WordPress transients API https://www.wpkube.com/back-to-the-future-with-wordpress-transients-api/ WordPress Themes, Plugins, Reviews & Tutorials Fri, 26 Jul 2013 15:00:53 +0000 hourly 1 https://wordpress.org/?v=6.3.1 By: Mopra https://www.wpkube.com/back-to-the-future-with-wordpress-transients-api/#comment-62499 Fri, 01 Feb 2013 15:32:49 +0000 http://www.wpkube.com/?p=6345#comment-62499 Really cool
I tried to do something like you but it has increased my Queries (20 to 23 but if I disable my custom query it give me 15 queries)

Here is my code :

$exemple = get_transient(‘exemples’);
if (false === $exemple) {
$exemple = new WP_Query(‘cat=’.$catss.”);
set_transient(‘exemples’, $exemple);
}
while ($exemple->have_posts()): $exemple->the_post();

Thanks for your help

]]>