Random code – issue with caching
-
Hi
I am using a random code script to show quotes on a template.$rows = get_field('quote' ); if( $rows ) { $index = array_rand( $rows ); $rand_row = $rows[ $index ]; $rand_row_quote = $rand_row['client_quote']; $rand_row_quote_source = $rand_row['quote_source']; ?>
<div class="smquotebox"> <div class="smquoteboxin"> <blockquote>
<?php echo $rand_row_quote; ?> <footer><?php $rand_row_quote_source; ?></footer> </blockquote> </div> </div>This is working fine without caching, but when I enable caching it doesn’t work.
Is there a way to exclude the random code from caching in the plugin, without excluding the whole page?
(If I exclude the page in settings it works, but I would rather not exclude all the pages using this template)Many thanks for any help!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
You must be logged in to reply to this topic.