Hi,
Please use the following hook code:
add_action('wpdiscuz_reset_comments_cache','swift_performance_custom_purge_cache');
add_action('wpdiscuz_reset_comments_extra_cache','swift_performance_custom_purge_cache');
function swift_performance_custom_purge_cache($postID){
if(class_exists('Swift_Performance_Cache')){
$premalink = get_permalink($postID);
Swift_Performance_Cache::clear_permalink_cache($premalink);
}
}
Put the code in the active theme functions.php file.
Thread Starter
alexg9
(@alexg9)
I’ve added the code on functions.php but nothing happens
https://ibb.co/gR5zhbt
Could you please remove the previously provided code and put this one:
add_action('wpdiscuz_reset_comments_cache','swift_performance_custom_purge_cache');
add_action('wpdiscuz_reset_comments_extra_cache','swift_performance_custom_purge_cache');
function swift_performance_custom_purge_cache($postID){
if(class_exists('Swift_Performance_Cache')){
Swift_Performance_Cache::clear_post_cache($postID);
}
}
Thread Starter
alexg9
(@alexg9)
Hi,
New code tested, but didn’t work
Please register and open a new support topic in the wpDiscuz.com forum for deeper support.