Are you a Wordpress Expert?

Discussion in 'WordPress' started by mike4uuu, Jul 20, 2010.

  1. #1
    If so help me out!

    How do i display "posts/articles without a comment ...." on the first main page instead of the latest post!

    I have around 300 post and half of them with comments ... the remaining half i want to display on the main page ... (those without comment )

    How do i do this ..?

    Thanks in advance!
     
    mike4uuu, Jul 20, 2010 IP
    Ibn Juferi likes this.
  2. wounded1987

    wounded1987 Well-Known Member

    Messages:
    2,914
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    150
    #2
    you can build a query that will display only the posts with comments on the front page of your website, if you use orderby=comment_count you can list posts with 0 comments on top with order=adc or desc. but if you need something more complicated you can create a Custom Select Query, an example (just example) will be

    $querystr = "
    SELECT wposts.*
    FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
    WHERE wposts.ID = wpostmeta.post_id
    AND wpostmeta.meta_key = 'tag'
    AND wpostmeta.meta_value = 'email'
    AND wposts.post_status = 'publish'
    AND wposts.post_type = 'post'
    ORDER BY wposts.post_date DESC
    ";

    $pageposts = $wpdb->get_results($querystr, OBJECT);

    ?>

    you can add i.e AND wposts.comment_count != 0

    I don't remember the exact names of the fields so you will need to improve that example, the example just refers to meta table, while u will need the comment table instead.
     
    wounded1987, Jul 20, 2010 IP
    psharma likes this.
  3. ayekaye01

    ayekaye01 Peon

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    when you are posting an article uncheck allow comments below the editor. you need to have a category for articles you want to appear on the index page or latest post.
     
    ayekaye01, Aug 4, 2010 IP
  4. psharma

    psharma Prominent Member

    Messages:
    1,955
    Likes Received:
    85
    Best Answers:
    4
    Trophy Points:
    345
    #4
    I don't think there is any plugin out there for this. You either have to code one yourself or select the posts manually.
     
    psharma, Aug 5, 2010 IP
  5. mike4uuu

    mike4uuu Active Member

    Messages:
    832
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Add a "wrong password" message to protected posts


    I'm trying to get wordpress to show a "wrong password" message when a user tries to access a protected post (front-end) and enters an incorrect password. Currently it just shows the exact same form again.

    Anyone have any idea to solve this issue?
    Thanks in Advance!
     
    mike4uuu, Aug 5, 2010 IP
  6. psharma

    psharma Prominent Member

    Messages:
    1,955
    Likes Received:
    85
    Best Answers:
    4
    Trophy Points:
    345
    #6
    Use Login Lock Down plugin and set login attemps to 1 ( but I recommend it to be 3 ). After that the user will be banned for few minutes set by you.
     
    psharma, Aug 5, 2010 IP
  7. mike4uuu

    mike4uuu Active Member

    Messages:
    832
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Hi!

    I'm talking about a password protected post or a page
     
    mike4uuu, Aug 5, 2010 IP
  8. psharma

    psharma Prominent Member

    Messages:
    1,955
    Likes Received:
    85
    Best Answers:
    4
    Trophy Points:
    345
    #8
    So? I am also talking about password protected pages. What else login means?
     
    psharma, Aug 5, 2010 IP
  9. mike4uuu

    mike4uuu Active Member

    Messages:
    832
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #9
    @Sharma R u talking about http://wordpress.org/extend/plugins/login-lockdown/ ?
    If so , this is for the main admin/user login !
    I want a plugin or a script which pop out a message when you enter a wrong password to a password protected post or page! in a wordpress blog!
     
    mike4uuu, Aug 5, 2010 IP
  10. psharma

    psharma Prominent Member

    Messages:
    1,955
    Likes Received:
    85
    Best Answers:
    4
    Trophy Points:
    345
    #10
    I see. I thought that it works for members login as well. have you tried?
     
    psharma, Aug 5, 2010 IP
  11. mike4uuu

    mike4uuu Active Member

    Messages:
    832
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #11
    Lol! no it will not ..
     
    mike4uuu, Aug 6, 2010 IP