CONFLICT COUNTER VIEWS / SCRIPT OLDER POST
-
Hi
after the update plugin
I observe another anomaly it seems to me ….The following script allows to display on the front side only posts less than one year old in display blocks (list)
it has been used for 2 years and I believe it comes from an exchange between us.
Now
When the script is active ….. the “get views” counters of posts older than one year go to zero
when it is inactive … the “views” counters return to the correct position
I therefore leave inactive for the moment while waiting for the solution.//////////////////////////////////////////////////////////////////////////////
WPP 2019 LIMITE ARTICLE DE MOINS D UN AN
Filters out popular posts that are older than the
specified time.
@ param string $where
@ param array $options
@ return stringfunction wpp_filter_posts_by_age($where, $options){
if ( ! is_admin() ) {
$where .= ‘ AND p.post_date >= DATE_SUB(NOW(), INTERVAL 1 YEAR) ‘;
}return $where;
}
add_filter(‘wpp_query_where’, ‘wpp_filter_posts_by_age’, 10, 2);//////////////////////////////////////////////////////////////////////////////////////
- This topic was modified 3 years, 7 months ago by .
- This topic was modified 3 years, 7 months ago by .
- This topic was modified 3 years, 7 months ago by .
- This topic was modified 3 years, 7 months ago by .
- This topic was modified 3 years, 7 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘CONFLICT COUNTER VIEWS / SCRIPT OLDER POST’ is closed to new replies.