wordpress article count

Discussion in 'Graphics & Webdesign' started by ata.online, May 13, 2010.

  1. ata.online

    ata.online New Member

    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    Referring to my original site:
    http://www.ata-articles.com/, does anyone know how i can correct the article count on this site which is similar to: http://www.ataarticles.com/ (hosted on x10hosting account). At present it has over 68000 articles but only under 4000 articles.

    I tried to add the following by going into Editor (header section). Also i checked the pages section and added all the details, but still no difference.

    Thanks.
     
    Last edited: May 13, 2010
  2. ata.online

    ata.online New Member

    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    0
    I found the code in Editor Main template:

    <p>There are <strong><?php echo $numposts ?></strong> published articles and <strong><?php echo $users ?></strong> registered authors in our article directory.</p>

    The html <strong> seems to be code that controls the article count. How can i correct this?

    Thanks.
     
  3. techairlines

    techairlines x10 Flyer Community Support

    Messages:
    2,867
    Likes Received:
    165
    Trophy Points:
    63
    Last edited: May 13, 2010
  4. ata.online

    ata.online New Member

    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    In functions.php, i found the following code for posts:


    /* Number of posts */
    if (get_wp_vers() < '2.3') $ptype = '';
    else $ptype = " AND post_type = 'post'";

    $numposts = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->posts." WHERE post_status = 'publish'".$ptype);
    if (0 < $numposts) $numposts = number_format($numposts);
    $numposts = preg_replace("','", '', $numposts);

    It seems it is already set as $numposts
     

Share This Page