From what u have written so far it seems menu_categorie
is the custom taxonomy. Make sure it is this only. I get a feeling that you have misses “s” from the end of menu_categorie
Anyways
The argument 'cat' => $id
you were using is used for default taxonomy i.e category
.
But in your case you have custom taxonomy menu_categorie
.
So you need to use the tax_query.
So this is how your code will look.
<div class="tab-content">
<?php
$cat_menu = get_categories('taxonomy=menu_categorie&type=menus');
foreach($cat_menu as $menu) {
echo '<div role="tabpanel" class="tab-pane active fade" id="'.$menu->slug.'">';
$id = (int) $menu->cat_ID;
$args = array(
'post_type' => 'menus',
'post_status' => 'publish',
'tax_query' =>
array(
array(
'taxonomy' => 'menu_categorie',
'field' => 'id',
'terms' => $id
),
),
);
$recipes = new WP_Query($args);
if($recipes->have_posts()) : while($recipes->have_posts()) : $recipes->the_post();
echo the_title();
endwhile; endif;
echo '</div>';
}
?>
</div>
This should work . If it doesn’t please let me know