<?php $query = new WP_Query( $args ); ?>
<?php $category_id = get_cat_ID(); ?>
<?php
$category_id = get_cat_ID();
$args = array(
'post_type' => 'company',
'posts_per_page' => 10,
/*
'tax_query' => array(
array(
'taxonomy' => 'company_category',
'field' => 'id',
'terms' => $category_id
)
)
*/
);
$query= new WP_Query( $args );
?>
<?php if ($query->have_posts() ) : ?>
<?php while ( $query->have_posts() ) : $acsessuar->the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php echo get_permalink(); ?>"><?php echo get_the_title( $ID ); ?></a>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 col-xxs-12">
<h1><span><?php single_cat_title('Каталог: '); ?> id=<?php echo $category_id = get_cat_ID();?></span></h1>
<?php $cat = get_term_by('name', single_cat_title('',false), 'company_category'); echo $catSlug = $cat->slug; ?>
</div>
</div>
<div class="row">
<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12 col-xxs-12 ">
<?php
$mypost = array(
'post_type' => 'company',
'posts_per_page' => 15,
'tax_query' => array(
array(
'taxonomy' => 'company_category',
'field' => 'slug',
'terms' => $catSlug
),
),
);
$loop = new WP_Query( $mypost );
?>
<?php while ( $loop->have_posts() ) : $loop->the_post();?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php echo get_permalink(); ?>"><?php echo get_the_title( $ID ); ?></a>
</div>
</article>
<?php endwhile; ?>
</div>
</div>
$tm_category = tm_get_category_by_url($_SERVER['REQUEST_URI']);
$include = $tm_category->cat_ID;
$exclude = genesis_get_option( 'blog_cat_exclude' ) ? explode( ',', str_replace( ' ', '', genesis_get_option( 'blog_cat_exclude' ) ) ) : '';
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
//* Easter Egg
$query_args = wp_parse_args(
genesis_get_custom_field( 'query_args' ),
array(
'cat' => $include,
'category__not_in' => $exclude,
'showposts' => genesis_get_option( 'blog_cat_num' ),
'paged' => $paged,
)
);
global $wp_query, $more;
$defaults = array(); //* For forward compatibility
$args = apply_filters( 'genesis_custom_loop_args', wp_parse_args( $query_args, $defaults ), $query_args, $defaults );
$wp_query = new WP_Query( $args );
//* Only set $more to 0 if we're on an archive
$more = is_singular() ? $more : 0;
if ( have_posts() ) :
do_action( 'genesis_before_while' );
while ( have_posts() ) : the_post();