(Is there a plugin) that counts the posts on your Wordpress blog?

Discussion in 'WordPress' started by MafiaPenguin, May 3, 2010.

  1. #1
    Hi there! :)

    The title says it all really, i have tried a few plugins and couldn't get them to work. So i thought i would ask here :)

    Im planning to use it to show how many films i have reviewed on filmhammer.com

    Thanks for your time ;)
     
    MafiaPenguin, May 3, 2010 IP
  2. deluxdon

    deluxdon Catch Me If You Can...!!!™ Staff

    Messages:
    25,482
    Likes Received:
    1,943
    Best Answers:
    32
    Trophy Points:
    480
    #2
    Use BlogStats plugin to display that at your WP blog.

    DON.
     
    deluxdon, May 3, 2010 IP
  3. Nonny

    Nonny Notable Member

    Messages:
    2,093
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    210
    #3
    Nonny, May 4, 2010 IP
  4. adbox

    adbox Well-Known Member

    Messages:
    906
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #4
    
    <?php
    
    $query = "SELECT * FROM ".$table_prefix."posts WHERE post_status='publish' AND post_type='post'";
    $result = mysql_query($query);
    $count = mysql_num_rows($result);
    
    //this will display the number of posts
    echo $count;
    ?>
    
    Code (markup):
     
    adbox, May 4, 2010 IP
  5. MafiaPenguin

    MafiaPenguin Guest

    Messages:
    134
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Great. Thanks for the help :D

    I will add it in later tonight to see if it works, however I'm sure it will.
     
    MafiaPenguin, May 4, 2010 IP
  6. rilwis

    rilwis Peon

    Messages:
    104
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    rilwis, May 6, 2010 IP