تاریخ انتشار :یکشنبه ۸ آبان ۹۰.::. ساعت : ۳:۲۳ ق.ظ
کدخبر : 2556:: بازدید3,733:: بامدیریت:فرهاد نظری

آرشیونظرات

 

$comments = $count_comments[‘approved’];

echo “تعدادکل نظرات سایت “.$comments.” نظر”;
?>
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = ‘1’ AND comment_type = ” AND
post_password = ””;
$sql2 = “SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,100) AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = ‘1’ AND comment_type = ” AND
post_password = ”
ORDER BY comment_date_gmt DESC”;
$total = count($wpdb->get_results($sql));
$page = isset( $_GET[‘pag’] ) ? abs( (int) $_GET[‘pag’] ) : 1;
$offset = ( $page * $items_per_page ) – $items_per_page;
$comments = $wpdb->get_results( $sql2 . ” LIMIT ${offset}, ${items_per_page}” );
$output = $pre_HTML;
$output .= “\n

    1. “;

 

    1. foreach ($comments as $comment) {

 

    1. $output .= “\n

    2. “.strip_tags($comment->comment_author)
      .” گفته:
      “. “ID) .
      “#comment-” . $comment->comment_ID . “\” title=\”لینک مستقیم به مطلب ” .
      $comment->post_title . “\”>” . strip_tags($comment->com_excerpt)
      .” ادامه . . .

“;
}
$output .= “\n

“;
$output .= $post_HTML;
echo $output;
echo paginate_links( array(
‘base’ => add_query_arg( $get ),
‘format’ => ‘/page/%#%’,
‘show_all’ => False,
‘end_size’ => 1,
‘mid_size’ => 14,
‘prev_text’ => __(‘« صفحه قبلی’),
‘next_text’ => __(‘صفحه بعدی »’),
‘total’ => ceil($total / $items_per_page),
‘current’ => $page

));
?>


نظرات بسته شده است.