jeudi 26 mars 2015

get_option returning old value for non-admin users


I am working on multisite with sub-folders. I am trying to create a plugin that will simply reduce the click counts and those counts will be visible to all users. For admin user all is working fine. But, for un-signedin user, I am getting some old value of option.


Following is the code;



add_action('wp_footer','click_counter');

function click_counter() {
?>
<div class="cc-container">
<span class="cc-counter"><?php echo get_option('click_counter_max'); ?></span>
</div>
<?php
}
?>




Aucun commentaire:

Enregistrer un commentaire