<input type="hidden" name="vid" id="inpun_id">
в форме модального окна <script>
var state = document.getElementById('vid_kredita');
vid_kredita.onchange = function() {
document.getElementById('inpun_id').value = vid_kredita.options[vid_kredita.selectedIndex].text;
}</script>
<?php
$arguments = array(
'orderby' => 'name',
'order' => 'ASC',
'number' => 0,
'taxonomy' => 'calc_cat',
'field' => 'slug',
);
$cats = get_categories($arguments);
foreach ($cats as $cat) {
echo $cat->cat_name; // Получаем название одной категории
$psts = query_posts( array(
'posts_per_page' => -1,
'post_type' => 'calc',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'calc_cat',
'field' => 'slug',
'terms' => $cat->cat_name
))
) );
foreach( $psts as $pst ){
echo $pst->post_title;//вывод продукта
}
} wp_reset_query();
?>
<div class="navbar-collapse collapse ">
<? $menu = array ("Главная"=>"/index.php", "ПОРТФОЛИО"=>"/portfolio.php", "Блог"=>"/blog.php", "Контакты"=>"/contact.php",);
echo "<ul class='nav navbar-nav'>";
foreach ($menu as $title=>$url) {
$class = strpos($_SERVER["PHP_SELF"], $url) !== false ? " class='active'" : "";
echo "<li$class><a href='$url'>$title</a><li>";
}
echo "</ul>";?>
</div>