</div> <div id="sidebar_central"> <div id="articulos" class="sidebox"> <h4>Artículos más</h4> <div class="sidebox_wrapper"> <div class="sidebox_content first"> <ul id="post_most_seen"> <?php echo kf_get_posts_by_hits(7, 10); ?> </ul> </div> <!-- sidebox_content --> <div class="sidebox_content"> <!-- VOTADOS --> <ul id="post_most_voted"> <?php echo mostrar_mas_votados(); ?> </ul> </div> <!-- sidebox_content -->
/** * Obtiene un post para mostrar en los titulares * @param integer $id * @param string $text texto * @return object */ function get_from_header($id, &$text) { global $wpdb; $sql['select'] = 'SELECT header_type, header_source'; $sql['from'] = 'FROM mulapress_news_headers'; $sql['where'] = 'WHERE id = ' . $id; $sql['limit'] = 'LIMIT 0,1'; $header = $wpdb->get_results(implode(' ', $sql)); $header = current($header); unset($sql); $post = NULL; switch ($header->header_type) { case "blog": $blog_id = get_blog_id_from($header->header_source); $post = get_from_blog($blog_id); $text = $header->header_source; break; case "post": $post = get_post_from_guid($header->header_source); $text = "una nota de " . $post->user_nicename; break; case "most_voted": $post = get_most_voted(); $text = "las más votadas "; break; case "most_commented": $post = kf_get_posts_by_hits(7, 1, false); $text = "las más comentadas "; break; case "special_blogs": $post = get_blog_special(); $text = "nuestra red "; break; case "feature": $text = "las noticias destacadas "; break; case "random_blog": $post = get_blog_random(); $text = "nuestros bloggers "; break; } return $post; }