Nikita21
Форумчанин

<?php
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
$this_cat_ID = $term->term_id;
$args = array(
'type' => 'product',
'orderby' => 'order',
'parent' => $this_cat_ID,
'taxonomy' => 'product_cat',
'hide_empty' => 0
);
$categories = get_categories( $args );
?>
<?
$childrens = get_children_cat($this_cat_ID);
if( $childrens ){
foreach( $childrens as $products ){
$id=$products->ID;
if (in_category(268)){} else{?> - это попытка ограничения вывода определенной категории.
<div class="product_item"> - это непосредственно вывод.
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
$this_cat_ID = $term->term_id;
$args = array(
'type' => 'product',
'orderby' => 'order',
'parent' => $this_cat_ID,
'taxonomy' => 'product_cat',
'hide_empty' => 0
);
$categories = get_categories( $args );
?>
<?
$childrens = get_children_cat($this_cat_ID);
if( $childrens ){
foreach( $childrens as $products ){
$id=$products->ID;
if (in_category(268)){} else{?> - это попытка ограничения вывода определенной категории.
<div class="product_item"> - это непосредственно вывод.