HI,
2 quick questions.
1. Is it possible to omit certain posts from being registered by WP Popular Posts?
2. I need to update the plugin manually. Will i loose the accumulated data on the posts popularity?
thanks a lot!
HI,
2 quick questions.
1. Is it possible to omit certain posts from being registered by WP Popular Posts?
2. I need to update the plugin manually. Will i loose the accumulated data on the posts popularity?
thanks a lot!
Hi jimjamming,
1. You'd need to hack my plugin to do that, but yes it is possible. For pages that WPP has not registered yet:
# Find the function update_mostpopular (line 284 on wordpress-popular-posts.php)
# Below "$postid = $wp_query->post->ID; // get post ID" (line 289), add this code:
$exclude = array(1,2,3); // the id's of the posts you wish to exclude (separated by comma)
if (in_array($postid, $exclude)) return $content;
For pages that WPP has already registered, but that you want to exclude from the listing:
# Find "$mostpopular = $wpdb->get_results" (line 162)
# Right after $nopages, add " AND $wpdb->posts.ID NOT IN(1,2,3) " (without quotes).
2. No, you won't lose any data so don't worry.
Along the same lines as question 1, is there a way to have this ignore certain post categories?
That'd require a more complex sql query, onedeep. I'll try a few different ideas and get back to you once I get a solution that won't require an extensive use of the database.
Thanks for the replies. Much appreciated.
Hi Ikki24,
any news on excluding categories? I could really use this possibility
Thanks!
Hi Ikki24 and taeke,
any news on excluding categories? I could really use this possibility
Thanks!
You must log in to post.