/** * Create a custom 'works' entries loop. * * @param array $params The portfolio loop parameters. */ function thb_portfolio_query($params = array()) { if (!thb_portfolio_framework_check()) { return; } global $wp_query; $post_type = 'works'; $args = thb_post_type_query_args($post_type, null, $params); $args = thb_array_asum($args, $params); thb_query_posts($post_type, $args); }
} ?> <div class="search_404"> <?php get_search_form(); ?> </div> <div class="col content-one-third"> <h3><?php _e("Last 30 posts:", 'thb_text_domain'); ?> </h3> <?php thb_query_posts('post', array('posts_per_page' => 30)); if (have_posts()) { ?> <ul> <?php while (have_posts()) { the_post(); ?> <li> <a href="<?php the_permalink(); ?> " rel="permalink"><?php the_title(); ?> </a>
function thb_works_query($params = array()) { global $wp_query; $post_type = 'works'; $args = thb_post_type_query_args($post_type); $args = thb_array_asum($args, $params); thb_query_posts($post_type, $args); }
function thb_post_query($override = array()) { global $wp_query; $post_type = 'post'; $args = thb_post_type_query_args($post_type); $args = thb_array_asum($args, $override); thb_query_posts($post_type, $args); }