چون حدس میزنم محتویات functions.php قالب نیاز باشه میذارم اینجا :
<?php
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'left',
'before_widget' => '<div class="menu"><div class="menu_t"><p> </p>',
'after_widget' => '</div></div><div class="menu_f"> </div></div>',
'before_title' => '<p>',
'after_title' => '</p></div><div class="menu_b" dir="rtl"><div id="best">'
));
register_sidebar(array(
'name' => 'right',
'before_widget' => '<div class="menu"><div class="menu_t"><p> </p>',
'after_widget' => '</div></div><div class="menu_f"> </div></div>',
'before_title' => '<p>',
'after_title' => '</p></div><div class="menu_b" dir="rtl"><div id="best">'
));
}
function get_hottopics($limit = 13) {
global $wpdb, $post;
$mostcommenteds = $wpdb->get_results("SELECT $wpdb->posts.ID, post_title, post_name, post_date, COUNT($wpdb->comments.comment_post_ID) AS 'comment_total' FROM $wpdb->posts LEFT JOIN $wpdb->comments ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_date_gmt < '".jdate("Y-m-d H:i:s")."' AND post_status = 'publish' AND post_password = '' GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_total DESC LIMIT $limit");
foreach ($mostcommenteds as $post) {
$post_title = htmlspecialchars(stripslashes($post->post_title));
$comment_total = (int) $post->comment_total;
echo "<li><a href=\"".get_permalink()."\">$post_title <strong>($comment_total نظر)</strong></a></li>";
}
}
?>