コード例 #1
0
    <?php 
get_template_part("partials/home/about", "section");
?>
  </section>

  <section class="content-block content-block--center-align">
    <?php 
$wp_query = latest_posts_of_type('work', 4);
?>
      <?php 
get_template_part("partials/home/work", "section");
?>
    <?php 
wp_reset_query();
?>
  </section>

  <section class="content-block content-block--center-align">
    <?php 
$wp_query = latest_posts_of_type('post', 4);
?>
      <?php 
get_template_part("partials/home/blog", "section");
?>
    <?php 
wp_reset_query();
?>
  </section>

<?php 
get_footer();
コード例 #2
0
ファイル: query_helper.php プロジェクト: AnnaNee/wordless
 /**
  * Get the last post of the specified type.
  *
  * @param string $type
  *   See QueryHelper::latest_posts_of_type().
  * @param string $order (optional)
  *   See QueryHelper::latest_posts_of_type().
  *
  * @return ??
  *   Last post of the selected type ordered.
  *
  * @ingroup helperfunc
  */
 function latest_post_of_type($type, $order = 'date')
 {
     return latest_posts_of_type($type, 1, $order);
 }
コード例 #3
0
ファイル: query_helper.php プロジェクト: nebirhos/wordless
 /**
  * Get the last post of the specified type.
  * 
  * @param string $type
  *   See QueryHelper::latest_posts_of_type().
  * @param string $order (optional)
  *   See QueryHelper::latest_posts_of_type().
  * 
  * @return ?? 
  *   Last post of the selected type ordered.
  * 
  * @ingroup helperfunc
  */
 function latest_post_of_type($type, $order = 'date')
 {
     $posts = latest_posts_of_type($type, 1, $order);
     return $posts[0];
 }