Conversation
supportIt’s me again;-) I use your plugin since few days and it works very well. But he asks me some performance issues because I have 15,000 posts. I wish to keep the synchronization every 3600 seconds for recent posts (maximum one month). For older articles, I will wish to establish a single synch daily. Can you help me ? https://wordpress.org/plugins/post-share-count/
Hi again) Pass ‘time’ parameter to function, example (inside the loop): if ( post_is_older() ) { the_post_share_count(array('time' => 60*60*24)); } else { the_post_share_count(array('time' => 3600)); } where post_is_older() is your custom function which returns true if post is old.
Tahnk you ! I did that, it seems ok? $current_date = date(‘my’); if ( $current_date > get_the_time( ‘my’ ) ) { the_post_share_count(array(‘time’ => 60*60*24)); } else { the_post_share_count(array(‘time’ => 3600)); }
Yes, it ok 😉
Hi again) Pass ‘time’ parameter to function, example (inside the loop): if ( post_is_older() ) { the_post_share_count(array('time' => 60*60*24)); } else { the_post_share_count(array('time' => 3600)); } where post_is_older() is your custom function which returns true if post is old.
Tahnk you ! I did that, it seems ok? $current_date = date(‘my’); if ( $current_date > get_the_time( ‘my’ ) ) { the_post_share_count(array(‘time’ => 60*60*24)); } else { the_post_share_count(array(‘time’ => 3600)); }
Yes, it ok 😉