Smith Nandagawali
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [W3 Total Cache] w3tc_pgcache_flush_post() function is not workingHi,
In my project we are using Redis cache which clears the cache after 4 hours, in between if I update any CPT the content change will not reflect for 4 hours. Therefore I want to purge the specific custom post type cache after update.
add_action( 'save_post', 'my_save_post_function', 10, 3 ); function my_save_post_function( $post_ID, $post, $update ) { global $post_type; if( $post_type == 'articles' ){ if (w3tc_flush_post($post_id)){ echo __('<div class="updated"><p>Working</p></div>'); }else{ echo __('<div class="error"><p>Not working</p></div>'); } } else{ echo __('<div class="error"><p>Out</p></div>'); } $msg = 'Is this un update? '; $msg .= $update ? 'Yes.' : 'No.'; wp_die( $msg ); }Using wp_die() I am checking the function is working or not.
Forum: Plugins
In reply to: [W3 Total Cache] w3tc_pgcache_flush_post() function is not workingHi,
Thanks for quick reply, I tried w3tc_flush_post( $post_id) it is still not working.Forum: Plugins
In reply to: [TotalPoll for Polls and Contests] How to select multiple polls with datesHi,
Ok, can you please tell me the custom field name using for end date, I will create a custom code for it.
Thanks
- This reply was modified 4 years, 2 months ago by Smith Nandagawali.
Forum: Plugins
In reply to: [TotalPoll for Polls and Contests] How to select multiple polls with datesHi,
I want to create multiple polls and according to the date wants to show it on a single page.
Example: if there are 10 polls 3 polls is expired so I can choose only those polls which are not expired.
Thanks for the early reply
Viewing 4 replies - 1 through 4 (of 4 total)