'pain', 'hide_empty' => false, 'orderby' => 'name', 'order' => 'ASC' ); $arr_pain = get_terms( $args );$the_query = new WP_Query( array( 'post_type' => 'medicaments', 'posts_per_page' => -1, 'orderby' => 'post_title', 'order' => 'ASC' )); $medicaments = $the_query->posts;$link = '/gde-kupit/'; if (ICL_LANGUAGE_CODE) if (ICL_LANGUAGE_CODE == 'uk') $link = '/uk'.$link; ?>

Де купити?

'medicaments', 'posts_per_page' => -1, 'orderby' => 'post_title', 'order' => 'ASC', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'geo_apteka', 'value' => '', 'compare' => '!=' ), array( 'key' => 'tabletki.ua', 'value' => '', 'compare' => '!=' ) ) )); $medicaments = $the_query->posts; $arr_geo_apteka = array(); $arr_tabletki = array(); $arr_pharmacy = array(); foreach ($medicaments as $item) { $geo_apteka = get_field('geo_apteka', $item->ID, true); if($geo_apteka != '') $arr_pharmacy['pharmacy1'][] = $item;$tabletki = get_field('tabletki.ua', $item->ID, true); if($tabletki != '') $arr_pharmacy['pharmacy2'][] = $item; }if(!empty($arr_pharmacy)) { foreach ( $arr_pharmacy as $key => $value ) { ?>
  • ID, true); if($key == 'pharmacy2') $post_url = get_field('tabletki.ua', $item->ID, true); $class = ''; if(!empty($_GET['medicament']) && $_GET['medicament'] != '' && $_GET['medicament'] == $item->post_name) $class = 'active-medicament'; ?>