Clear cache on post of one type when something happens to post of other type

I suppose a quick and dirty way to achieve what you want is to clear the entire site cache, something like this: function clear_rocket_cache_on_post_save() { rocket_clean_domain(); } add_action( ‘save_post’, ‘clear_rocket_cache_on_post_save’ ); Otherwise you’ll need to do a query to get the matching post, something like this should work: function clear_rocket_cache_on_post_save( $post_id ) { // $result_id … Read more

save_post custom post type ? $_POST not working?

From what I can see there is no value set for ct_list_url2, when this code block executes, $meta = array(‘ct_download_link’, ‘ct_list_url’, ‘ct_list_url2’); foreach($meta as $dt) { if($dt == ‘ct_list_url2’) { $_POST[$dt] = get_blogspot_url($_POST[$dt]); } if(isset($_POST[$dt]) && $_POST[$dt] !== ”) { update_post_meta($post->ID, $dt, $_POST[$dt]); } else { delete_post_meta($post->ID, $dt); } … …in fact that goes for … Read more

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