Exemplo n.º 1
0
function extra_get_portfolio_projects($args = array())
{
    $default_args = array('post_type' => EXTRA_PROJECT_POST_TYPE, 'nopaging' => true, 'posts_per_page' => -1);
    $args = wp_parse_args($args, $default_args);
    $portfolio_options = extra_get_portfolio_options();
    if (!empty($portfolio_options['project_categories'])) {
        $term_ids = array();
        foreach ($portfolio_options['project_categories'] as $category) {
            $term_ids[] = $category->term_id;
        }
    }
    if (!empty($term_ids)) {
        $args['tax_query'] = array(array('taxonomy' => EXTRA_PROJECT_CATEGORY_TAX, 'field' => 'id', 'terms' => $term_ids, 'operator' => 'IN'));
    }
    $projects = new WP_Query($args);
    return $projects;
}
Exemplo n.º 2
0
get_header();
?>
<div id="main-content">
	<div class="container">
		<div id="content-area" class="<?php 
extra_sidebar_class();
?>
 clearfix">
	<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
			<div class="et_pb_extra_column_main">
				<?php 
        $portfolio_options = extra_get_portfolio_options();
        ?>
				<div class="et_pb_extra_row container-width-change-notify">
					<div class="et_pb_extra_column et_pb_extra_column_4_4">
						<?php 
        if (!$portfolio_options['hide_title']) {
            ?>
							<h1 class="page-title"><?php 
            the_title();
            ?>
</h1>
						<?php 
        }
        ?>
					</div>
				</div>