http://www.game24.org/category/action/哪里可以变成8行?

解决方案 »

  1.   

    <div class="randomgame">
              <div class="gamethumb">
              <div class="gamethumb">
              <div class="gamethumb">
              <div class="gamethumb">
    .....<div>
    很显然是个循环,找到循环。或者找到对应的sql吧限制条数改一下不就可以了
      

  2.   

    是啊,我也知道。SQL找不到。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,30) AS com_excerptFROM $wpdb->commentsLEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =$wpdb->posts.ID)WHERE comment_approved = '1' AND comment_type = '' ANDpost_password = ''ORDER BY comment_date_gmt DESCLIMIT 7=========================应该是5列,那没找看到5
      

  3.   

    你是指那些游戏的logo吧?应该是在模板中控制的
      

  4.   

    我也知道在模板里,但是找不到SQL语句,就一句而已。<?php get_header(); ?><div class="indextop"><div class="randomgames"><?php if (have_posts()) : ?><div class="randomtop2">    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>    <?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle"><?php single_cat_title(); ?> Games</h2>    <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h2 class="pagetitle"><?php single_tag_title(); ?> Games</h2>    <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>   <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="pagetitle">Author Archive</h2>    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2 class="pagetitle">Blog Archives</h2>    <?php } ?></div><div class="randomgame"><?php while (have_posts()) : the_post(); ?><div class="gamethumb"><div class="thumbs"><a href="<?php the_permalink() ?>" title="Play <?php the_title_attribute(); ?>"><img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="" height="80" width="96" /></a></div><div class="thumbtitle"><a href="<?php the_permalink() ?>" rel="book" title="Play <?php the_title_attribute(); ?>"><?php$tit = the_title('','',FALSE);echo substr($tit, 0, 15);if (strlen($tit) > 15) echo " ...";?></a></div></div><?php endwhile; ?></div><div class="randombottom"></div><?php if(function_exists('wp_pagenavi')) { wp_pagenavi('', '', '', '', 3, false);} ?><?php endif; ?></div><?php include (TEMPLATEPATH . '/ads/ad-336-280.php'); ?></div><?php get_footer(); ?>
      

  5.   

    <?php while (have_posts()) : the_post(); ?>这个是显示的,但是这个哪里可以修改他。好象是wordpress固定的。
      

  6.   


    这个是没错。循环的话在哪里找了。 the_post();这个是WORDPRESS的函数
      

  7.   

    function the_post() {
    global $post;
    $this->in_the_loop = true; if ( $this->current_post == -1 ) // loop has just started
    do_action_ref_array('loop_start', array(&$this)); $post = $this->next_post();
    setup_postdata($post);
    } /**
     * Whether there are more posts available in the loop.
     *
     * Calls action 'loop_end', when the loop is complete.
     *
     * @since 1.5.0
     * @access public
     * @uses do_action_ref_array() Calls 'loop_end' if loop is ended
     *
     * @return bool True if posts are available, false if end of loop.
     */
    function have_posts() {
    if ( $this->current_post + 1 < $this->post_count ) {
    return true;
    } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
    do_action_ref_array('loop_end', array(&$this));
    // Do some cleaning up after the loop
    $this->rewind_posts();
    } $this->in_the_loop = false;
    return false;
    }