2012-06-12 99 views

回答

1

如果您使用自定義查詢,則可以指定頁面ID。來自食典委;

$query = new WP_Query(array('post_type' => 'page', 'post__in' => array(2, 5, 12, 14, 20))); 

要找到你懸停在後臺的頁面屏幕的鏈接,每一個單獨頁面的頁面ID,你會看到頁面ID的URL

編輯 - 確定的基礎上,你的評論你會改變它以下(假設你的頁面id是2,5和12);

<?php $homepage_query = new WP_Query(array('post_type' => 'page', 'post__in' => array(2, 5, 12))); 
     while ($homepage_query->have_posts()) : $homepage_query->the_post(); ?> 

      <div class="main_post"> 
        etc etc 
      </div> 

    <?php endwhile; ?> 
+0

我很難調整我的代碼與該行...... – TM23

相關問題