• I am using the Woothemes Gazette theme on my site and i cannot get the “popular” tab to display any results. my site is http://www.eastkeilorfc.com

    Even after changing the theme to Busy Bee and Daily Edition i am having the same proble. The other tabs work but nothing under Popular.

    Can anyone help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • well its suppose to display the most popular post by amount of views it gets right, go edit your theme i think it should be in the sidebar to see if theres any code placed in the popular tab or check if you didn’t activate something.

    Thread Starter pepperama

    (@pepperama)

    I have checked. This is the code from the “Popular” function –

    <?php
    $pop_posts = get_option(‘woo_popular_posts’);
    if (empty($pop_posts) || $pop_posts < 1) $pop_posts = 8;
    $now = gmdate(“Y-m-d H:i:s”,time());
    $lastmonth = gmdate(“Y-m-d H:i:s”,gmmktime(date(“H”), date(“i”), date(“s”), date(“m”)-24,date(“d”),date(“Y”)));
    $popularposts = “SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS ‘stammy’ FROM $wpdb->posts, $wpdb->comments WHERE comment_approved = ‘1’ AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = ‘publish’ AND post_date < ‘$now’ AND post_date > ‘$lastmonth’ AND comment_status = ‘open’ GROUP BY $wpdb->comments.comment_post_ID ORDER BY stammy DESC LIMIT “.$pop_posts;
    $posts = $wpdb->get_results($popularposts);
    $popular = ”;
    if($posts){
    foreach($posts as $post){
    $post_title = stripslashes($post->post_title);
    $guid = get_permalink($post->ID);

    $custom_field = get_post_meta($post->ID, “image”, true);
    ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woothemes Popular Tab’ is closed to new replies.