Excluding post from 'Popular Posts Bars' plugin
-
I’ve been using the Engadget-style popular posts plugin – which works great, but I need to exclude a single post from being displayed.
I know almost nothing about PHP and I’m not sure exactly how difficult (or easy?) it might be to accomplish this, but I was wondering if any of you guys could help me out?
I’m pretty sure that the part I need to modify is the following;
else { $most_viewed_posts = $wpdb->get_results("SELECT " . $wpdb->prefix . "posts.id, " . $wpdb->prefix . "posts.post_title, " . $wpdb->prefix . "posts.post_status, " . $wpdb->prefix . "posts.guid, COUNT(" . $mostviewedbars_table . ".post_id) AS view_count FROM " . $wpdb->prefix . "posts JOIN " . $mostviewedbars_table . " ON " . $mostviewedbars_table . ".post_id = " . $wpdb->prefix . "posts.id WHERE " . $wpdb->prefix . "posts.post_status = 'publish' AND " . $mostviewedbars_table . ".date > '" . $time_start . "' GROUP BY " . $mostviewedbars_table . ".post_id ORDER BY view_count DESC, post_date DESC LIMIT " . $instance['number_posts']); }
Can anyone think of a quick way to exclude a specific post by category here?
And again; I’m not a Web developer, so I’m not even sure if this is the right snippet of code, but it seems like it would be.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Excluding post from 'Popular Posts Bars' plugin’ is closed to new replies.