File: /var/www/kevin-demo/wp-content/themes/fitmencook/archive-recipes.php
<?php
get_header();
$featured_image = get_field('featured_recipe_image', 'option');
$size = 'full';
// Unesi imena kategorija koje želiš da isključiš
$category_names = array('Multiple Recipes');
$category_ids = array();
foreach ($category_names as $category_name) {
$category = get_term_by('name', $category_name, 'recipe-category');
if ($category) {
$category_ids[] = $category->term_id;
}
}
$ex_cats = $category_ids; // Kategorije koje želimo da isključimo
?>
<div class="fmc_archive_wrap fmc_container spacing_2">
<?php if (function_exists('yoast_breadcrumb')) { yoast_breadcrumb('<div class="fmc_breadcrumbs spacing_0_2">', '</div>'); } ?>
<?php
$featured_posts = get_field('featured_recipe', 'option');
if ($featured_posts && !isset($_GET['ingredient'])) :
foreach ($featured_posts as $feature_post) :
global $post;
$post = $feature_post;
setup_postdata($post);
$categories = get_the_terms($post->ID, 'recipe-category');
if ($categories && !has_term($ex_cats, 'recipe-category', $post->ID)) {
$calculations = meal_plan_calculations(true);
$template_slug = get_page_template_slug();
?>
<div class="fmc_featured_post fmc_featured_recipe">
<div class="fmc_featured_left">
<a href="<?php the_permalink(); ?>">
<?php if ($featured_image) { echo wp_get_attachment_image($featured_image, $size); } else { the_post_thumbnail('large'); } ?>
</a>
</div>
<div class="fmc_featured_right">
<span class="fmc_featured_prefix"><?php echo get_field('featured_prefix', 'option'); ?></span>
<div class="fmc_grid_meta">
<span class="fmc_grid_cat">
<?php if (!empty($categories)) { echo '<a href="' . esc_url(get_category_link($categories[0]->term_id)) . '">' . esc_html($categories[0]->name) . '</a>'; } ?>
</span>
</div>
<a href="<?php the_permalink(); ?>">
<h2 class="fmc_title_1"><?php the_title(); ?></h2>
</a>
<div class="fmc_featured_rating">
<?php echo get_avarage_rating(get_the_ID(), 'sidebar'); ?>
</div>
<?php if ($template_slug === 'single-recipes-multiple.php') : ?>
<div class="fmc_featured_macros">
<?php if ($calculations['totals']) : $calculations_count = 1; ?>
<?php foreach ($calculations['totals'] as $label => $total) : if ($total === 0) continue; ?>
<div class="rg_macro <?php if ($calculations_count === 1) echo "calories"; ?>">
<span class="rg_m_title"><?php if ($calculations_count === 1) echo "Cal"; else echo $label; ?></span>
<span class="rg_m_amount"><?php echo $total; ?></span>
</div>
<?php $calculations_count++; endforeach; ?>
<?php endif; ?>
</div>
<?php if ($calculations['total_times']) : ?>
<div class="fmc_featured_prep">
<?php foreach ($calculations['total_times'] as $single_time) : if ($single_time['hours'] || $single_time['min']) : ?>
<div class="fmc_f_time_container">
<span class="fmc_time"><?php echo $single_time['label']; ?></span>
<?php if ($single_time['hours']) : ?>
<span class="fmc_amount"><?php echo $single_time['hours']; ?></span>
<?php endif; ?>
<?php if ($single_time['min']) : ?>
<span class="fmc_amount"><?php echo $single_time['min']; ?></span>
<?php endif; ?>
</div>
<?php endif; endforeach; ?>
</div>
<?php endif; ?>
<?php else : ?>
<div class="fmc_featured_macros">
<div class="rg_macro calories">
<span class="rg_m_title">Cal</span>
<span class="rg_m_amount"><?php echo get_field('calories'); ?></span>
</div>
<div class="rg_macro carbs">
<span class="rg_m_title"><?php echo get_field('l_carbs', 'option'); ?></span>
<span class="rg_m_amount"><?php echo get_field('carbs'); ?>g</span>
</div>
<div class="rg_macro fat">
<span class="rg_m_title"><?php echo get_field('l_fat', 'option'); ?></span>
<span class="rg_m_amount"><?php echo get_field('fat'); ?>g</span>
</div>
<div class="rg_macro protein">
<span class="rg_m_title"><?php echo get_field('l_protein', 'option'); ?></span>
<span class="rg_m_amount"><?php echo get_field('protein'); ?>g</span>
</div>
</div>
<div class="fmc_featured_prep">
<div class="fmc_f_time_container">
<span class="fmc_time"><?php echo get_field('l_prep_time', 'option'); ?>:</span>
<span class="fmc_amount"><?php if (get_field('prep_hours')) { echo get_field('prep_hours'); ?>h <?php } ?> <?php echo get_field('prep_time'); ?><?php echo get_field('minutes', 'option'); ?></span>
</div>
<div class="fmc_f_time_container">
<span class="fmc_time"><?php echo get_field('l_cook_time', 'option'); ?>:</span>
<span class="fmc_amount"><?php if (get_field('cook_hours')) { echo get_field('cook_hours'); ?>h <?php } ?> <?php echo get_field('cook_time'); ?><?php echo get_field('minutes', 'option'); ?></span>
</div>
<div class="fmc_f_time_container">
<span class="fmc_time"><?php echo get_field('l_total_time', 'option'); ?>:</span>
<span class="fmc_amount"><?php if (get_field('total_hours')) { echo get_field('total_hours'); ?>h <?php } ?> <?php echo get_field('total_time'); ?><?php echo get_field('minutes', 'option'); ?></span>
</div>
</div>
<?php endif; ?>
</div>
</div>
<?php
}
endforeach;
wp_reset_postdata();
endif;
?>
<h2>Cuisine</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div> <div style="width:100%" class="test_images">
<div class="mdiv" >
<div class="imagerecM" style=" margin-right: 1%; margin-bottom: 20px; border-radius:10px;">
<a href="/recipes/category/soulfood-southern/">
<img src="/wp-content/uploads/2023/03/soul-food-lunchbox-1.jpg" alt="Soulfood">
<p>SOULFOOD / SOUTHERN</p>
</a>
</div>
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/american/">
<img src="/wp-content/uploads/2024/01/bison-burger.jpg" alt="American food">
<p>AMERICAN</p>
</a>
</div> -->
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/mediterranean/">
<img src="/wp-content/uploads/2024/08/creamy-hummus-14.jpg" alt="Mediterranean food">
<p>MEDITERRANEAN</p>
</a>
</div> -->
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/asian/">
<img src="/wp-content/uploads/2023/03/teriyaki-salmon-fried-rice-8.jpg" alt="Asian Food">
<p>ASIAN</p>
</a>
</div> -->
<div class="imagerecM" style=" margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/latin-american/">
<img src="/wp-content/uploads/2025/02/bison-chopped-salad-taco-bowl-8.jpg" alt="Latin American">
<p >LATIN AMERICAN</p>
</a>
</div>
<!-- <div style="clear: both;"></div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/european/">
<img src="/wp-content/uploads/2023/03/DSC_0039-311.jpg" alt="European Food">
<p>EUROPEAN</p>
</a>
</div> -->
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/african/">
<img src="/wp-content/uploads/2021/01/lamb-chickpea-stew-16.jpg" alt="African Food">
<p>AFRICAN</p>
</a>
</div> -->
<div style="clear: both;"></div>
</div>
</div>
<h2>Diet</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div>
<div class="test_images">
<div style="display: flex; flex-wrap: wrap;">
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/vegan/">
<img src="/wp-content/uploads/2023/09/sweet-potato-pie-protein-oats-42.jpg" alt="Vegan">
<p>VEGAN</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/vegetarian/">
<img src="/wp-content/uploads/2024/10/vegetarian-recipes.webp" alt="Vegetarian">
<p>VEGETARIAN</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/paleo/">
<img src="/wp-content/uploads/2023/04/madagascar-coconut-fish-recipe-4.jpg" alt="Paleo">
<p>PALEO</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/gluten-free/">
<img src="/wp-content/uploads/2025/04/Gluten-Free-Cheese-Crackers-recipe-9.jpg" alt="Gluten Free">
<p>GLUTEN-FREE</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/grain-free/">
<img src="/wp-content/uploads/2021/03/popcorn-granola-1.jpg" alt="Grain Free">
<p>GRAIN-FREE</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/dairy-free/">
<img src="/wp-content/uploads/2023/08/shrimp-scampi-10-min-meal-8.jpg" alt="Diary Free">
<p>DAIRY-FREE</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/low-carb/">
<img src="/wp-content/uploads/2023/03/creamy-med-chicken-tomato-3.jpg" alt="Low Carb and Keto">
<p>LOW CARB / KETO (LESS THAN 30G)</p>
</a>
</div>
<div style="clear: both;"></div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/high-carb/">
<img src="/wp-content/uploads/2023/01/protein-abundance-bowl-web-5.jpg" alt="High Carb">
<p>HIGH CARB (GREATER THAN 50G)</p>
</a>
</div>
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="#">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>HI-PROTEIN</p>
</a>
</div> -->
<div style="clear: both;"></div>
</div>
</div>
<h2>Meal Type</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div>
<div class="test_images">
<div style="display: flex; flex-wrap: wrap;">
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/no-cook/">
<img src="/wp-content/uploads/2023/06/no-cook-recipes-cucumber-peanut-salad-5.jpg" alt="No Cook">
<p>NO COOK</p>
</a>
</div> -->
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/cold-meal/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="Cold Meal">
<p>COLD MEAL</p>
</a>
</div> -->
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/meal-prep/">
<img src="/wp-content/uploads/2023/03/greek-turkey-burger-meal-prep-7.jpg" alt="Meal Prep Friendly">
<p>MEAL PREP FRIENDLY</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/breakfast/">
<img src="/wp-content/uploads/2023/03/IMG_0426-111.jpg" alt="Breakfast">
<p>BREAKFAST</p>
</a>
</div>
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/lunch/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>LUNCH</p>
</a>
</div> -->
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/dinner/">
<img src="/wp-content/uploads/2025/01/Mexican-Meal-Prep-Ideas.webp" alt="">
<p>DINNER</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/drinks-and-smoothies/">
<img src="/wp-content/uploads/2023/03/DSC01929-311.jpg" alt="Smoothies">
<p>SMOOTHIES</p>
</a>
</div>
<!-- <div style="clear: both;"></div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/juices-drinks/">
<img src="/wp-content/uploads/2024/09/green-lemonade-B-7.jpg" alt="Juices and Drinks">
<p>JUICES / DRINKS</p>
</a>
</div> -->
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/salad/">
<img src="/wp-content/uploads/2024/05/carrot-ginger-miso-salad-20.jpg" alt="Salads">
<p>SALADS</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/snacks/">
<img src="/wp-content/uploads/2025/04/pizza-bites-5.jpg.webp" alt="Snacks">
<p>SNACKS (APPETIZER)</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/soups/">
<img src="/wp-content/uploads/2023/10/green-chile-chicken-white-bean-soup-42-scaled.jpg" alt="Soups">
<p>SOUPS</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/sandwiches/">
<img src="/wp-content/uploads/2023/03/cajun-spread-chicken-sandwich-111.jpg" alt="Sandwiches">
<p>SANDWICHES / WRAPS</p>
</a>
</div>
<div style="clear: both;"></div>
</div>
</div>
<h2>Protein / Ingridient</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div>
<div class="test_images">
<div style="display: flex; flex-wrap: wrap;">
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/chicken/">
<img src="/wp-content/uploads/2023/03/DSC02717-1211.jpg" alt="Chicken">
<p>CHICKEN</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/beef/">
<img src="/wp-content/uploads/2023/03/DSC02677-511.jpg" alt="Beef">
<p>BEEF</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/turkey/">
<img src="/wp-content/uploads/2023/03/greek-turkey-burger-meal-prep-1.jpg" alt="Turkey">
<p>TURKEY</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/seafood/">
<img src="/wp-content/uploads/2024/06/salmon-wellington-recipe-10.jpg" alt="SeaFood">
<p>SEAFOOD</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/protein-powder/">
<img src="/wp-content/uploads/2023/08/protein-cookies.jpg" alt="Protein Powder">
<p>PROTEIN POWDER</p>
</a>
</div>
<div style="clear: both;"></div>
</div>
</div>
<h2>Tools / Utensils</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div>
<div style="width:100%" class="test_images">
<div style="display: flex;">
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/one-pot/">
<img src="/wp-content/uploads/2023/03/taco-chicken-rice-2.jpg" alt="One Pot">
<p>ONE POT</p>
</a>
</div> -->
<div class="imagerecM" style=" margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/air-fryer-oven/">
<img src="/wp-content/uploads/2023/03/cheeseburger-egg-rolls-3-2.jpg" alt="Air Fryer">
<p>AIR FRYER / OVEN</p>
</a>
</div>
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/sheet-pan-meal/">
<img src="/wp-content/uploads/2023/05/salmon-nicoise-salad-20.jpg" alt="Sheet Pan Meal">
<p>SHEET PAN MEAL</p>
</a>
</div> -->
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/blender/">
<img src="/wp-content/uploads/2024/08/creamy-hummus-16.jpg" alt="Blender">
<p>BLENDER</p>
</a>
</div> -->
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/instant-pot/">
<img src="/wp-content/uploads/2023/04/DSC05698-2.jpg" alt="Instant Pot">
<p>INSTANT POT (MULTICOOKER) - SLOW COOKER</p>
</a>
</div> -->
<!-- <div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/grill-smoker/">
<img src="/wp-content/uploads/2023/03/salmon-smoked-air-fried-baked-burgers-1321.jpg" alt="Grill Smoker">
<p>GRILL / SMOKER</p>
</a>
</div> -->
<div style="clear: both;"></div>
</div>
</div>
<!-- <h2>Holidays / Seasons</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div>
<div class="test_images">
<div style="display: flex; flex-wrap: wrap;">
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/halloween/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>HALLOWEEN</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/thanksgiving/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>THANKSGIVING</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/christmas-kwanzaa/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>CHRISTMAS (KWANZAA)</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/nye/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>NYE</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/valentines/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>VALENTINE'S</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/mothers-day/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>MOTHER'S DAY</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/fathers-day/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>FATHER'S DAY</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/winter/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>WINTER</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/fall/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>FALL</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/spring/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>SPRING</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/summer/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>SUMMER</p>
</a>
</div>
<div style="clear: both;"></div>
</div>
</div>
-->
<!-- <h2>Entertaining</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div>
<div class="test_images">
<div style="display: flex; flex-wrap: wrap;">
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/game-day-tailgating/">
<img src="/wp-content/uploads/2023/03/Mediterranean-Herb-Chicken-Smash-Burger-with-hand11.jpg" alt="Game Day">
<p>GAME DAY / TAILGATING</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="/recipes/category/parties/">
<img src="/wp-content/uploads/2023/03/ultimate-lasagna-1.jpg" alt="Parties">
<p>PARTIES</p>
</a>
</div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;"> -->
<!-- <a href="#">
<img src="/wp-content/uploads/2021/06/pizza-bites-5-1.jpg" alt="Appetizer">
<p>APPETIZER</p>
</a> -->
<!-- </div>
<div class="imagerec2" style="width: 23%; margin-right: 1%; margin-bottom: 20px;">
<a href="https://fitmencook.com/recipes/category/date-night/">
<img src="https://fitmencook.com/wp-content/uploads/2025/02/ginger-chicken-stirfry-meal-prep-6.jpg" alt="">
<p>DATE NIGHT (VALENTINE'S)</p>
</a>
</div> -->
<!-- <div style="clear: both;"></div>
</div>
</div> -->
<h2>Browse Recipes</h2>
<div style="width: 100%; height: 2px; background-color: #ededed; margin: 10px 0;"></div>
<div class="fmc_recipe_filter">
<form method="GET" action="">
<select name="recipe-category" onchange="this.form.submit()" style="border: 1px solid #ededed; border-radius: 7px; background-color: white; padding: 10px;">
<option value=""><?php _e('Select a Category', 'your-theme-textdomain'); ?></option>
<?php
$filter_categories = get_terms([
'taxonomy' => 'recipe-category',
'hide_empty' => false, // Prikazuj i prazne kategorije
]);
if (!empty($filter_categories) && !is_wp_error($filter_categories)) {
$excluded_category_slug = 'multiple-recipes';
foreach ($filter_categories as $filter_category) {
// Isključivanje određene kategorije
if ($filter_category->slug === $excluded_category_slug) {
continue;
}
// Provera selektovane kategorije
$selected = isset($_GET['recipe-category']) && $_GET['recipe-category'] === $filter_category->slug ? 'selected' : '';
echo '<option value="' . esc_attr($filter_category->slug) . '" ' . $selected . '>' . esc_html($filter_category->name) . '</option>';
}
} else {
echo '<option disabled>' . __('No categories available', 'your-theme-textdomain') . '</option>';
}
?>
</select>
</form>
</div>
<div class="fmc_recipe_grid fmc_archive_main" style="width: 100%;">
<div class="fmc_archive_inner fmc_rg_inner" style="display: grid;grid-template-columns: repeat(4, 1fr);gap: 20px;">
<?php
while (have_posts()) : the_post();
if (!has_term($ex_cats, 'recipe-category')) :
get_template_part('template-parts/recipe/recipe-grid2');
endif;
endwhile;
?>
</div>
</div>
<div class="spacing_3_1">
<?php fmc_pagination(); ?>
</div>
</div>
<?php
get_footer();
?>