How do I create a link in the WP admin bar that purges all caches (W3 Total Cache)?

You should use wp_nonce_url() to generate the URL with a valid nonce rather than hard-coding one, e.g. here’s the code from w3_total_cache itself that does this: ‘href’ => wp_nonce_url( network_admin_url( ‘admin.php?page=w3tc_dashboard&w3tc_flush_all’ ), ‘w3tc’ ) You could also use a permissions check instead of checking if the user is ID 1, although I appreciate there are … Read more

Exclude Random Redirect from caching?

Use jQuery or Javascript to cycle through and randomly pick one of your links, this way you can bypass the caching? var messages = [“Good!”, “Great!”, “Awesome!”, “Super!”, “Nice!”]; function getMessage() { return messages[Math.floor(Math.random() * messages.length)]; } From https://stackoverflow.com/questions/3419928/how-can-i-return-a-random-value-from-an-array

Page comes up blank using w3 total cache [closed]

You can turn off caching for your wp_list_comments template by placing define(‘DONOTCACHEPAGE’, true); at the top of the page. Other constants available on a per page or template basis are: define(‘DONOTCACHEDB’, true); Disables database caching for given page. define(‘DONOTMINIFY’, true); Disables minify for a given page. define(‘DONOTCDN’, true); Disables content delivery network for a given … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)