<?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();
/** * 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); }
/** * 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]; }