esger
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: [Plugin: WP-RecentComments] Links to paged comments brokenHere is how to fix it :
You need to add a post_status = ‘inherit’ in the query.
So… Edit
/wp-recentcomments/core.php
Replace line 85
$comments_query = "SELECT comment_author, comment_author_email, comment_author_url, comment_ID, comment_post_ID, comment_content, comment_type, comment_author_IP, comment_agent FROM $wpdb->comments, $wpdb->posts WHERE comment_approved = '1' AND comment_post_ID = ID AND post_status = 'publish'" . $sql_protected . $sql_private . $sql_pingback . $sql_trackback . $sql_administrator . " ORDER BY comment_date_gmt DESC LIMIT " . $start . "," . $size;
with
$comments_query = "SELECT comment_author, comment_author_email, comment_author_url, comment_ID, comment_post_ID, comment_content, comment_type, comment_author_IP, comment_agent FROM $wpdb->comments, $wpdb->posts WHERE comment_approved = '1' AND comment_post_ID = ID AND post_status = 'publish' OR post_status = 'inherit'" . $sql_protected . $sql_private . $sql_pingback . $sql_trackback . $sql_administrator . " ORDER BY comment_date_gmt DESC LIMIT " . $start . "," . $size;
line 197 :
$comment = $wpdb->get_row($wpdb->prepare("SELECT comment_author, comment_author_email, comment_author_url, comment_ID, comment_post_ID, comment_content, comment_date, comment_author_IP, comment_agent FROM $wpdb->comments, $wpdb->posts WHERE comment_post_ID = ID AND post_status = 'publish' AND comment_ID = " . $id));
with
$comment = $wpdb->get_row($wpdb->prepare("SELECT comment_author, comment_author_email, comment_author_url, comment_ID, comment_post_ID, comment_content, comment_date, comment_author_IP, comment_agent FROM $wpdb->comments, $wpdb->posts WHERE comment_post_ID = ID AND post_status = 'publish' OR post_status = 'inherit' AND comment_ID = " . $id));
Steve
Forum: Fixing WordPress
In reply to: Local Virtual HostsMany many MANY thanks to you!
Been looking for a way to do this for days!
Was also trying to find a way to simply map in the host file but for a reason I don’t know, that doesn’t work…
Now, let’s test and debug those websites for IE.. Doh!