{{-- Brand + about + contact (first column) --}}
@if ($logoUrl) {{ $siteName }} @endif {{ $siteName }} @if (! empty($brandTagline)) {{ $brandTagline }} @endif
@if (! empty($footerAbout))

{!! nl2br(e($footerAbout)) !!}

@endif
@if ($phoneRaw) {{ $phone }}
@endif @if ($email) {{ $email }} @endif
{{-- Three menu columns. Each is driven by: - `show` toggle from Customizer (eg_footer_col{1,2,3}_show) - `title` text from Customizer (eg_footer_col{1,2,3}_title) - `menu_location` — WP menu location to render - `demo` — placeholder links used only when no menu is assigned (and no auto-fallback applies) Rendering priority for each column: 1. Real menu assigned in Appearance → Menus → render it. 2. (Catalog only) WC product categories exist → render those. 3. Otherwise → render the demo placeholders from the composer. So a fresh install looks complete out of the box, and as soon as a real menu is assigned the demo is replaced automatically. --}} @foreach ($footerCols as $key => $col) @if ($col['show']) @php $hasMenu = has_nav_menu($col['menu_location']); // Catalog column tries WC product categories before the demo. $catalogCats = []; if ($key === 'catalog' && ! $hasMenu && function_exists('get_terms')) { $terms = get_terms([ 'taxonomy' => 'product_cat', 'hide_empty' => false, 'parent' => 0, 'number' => 5, ]); if (! is_wp_error($terms) && ! empty($terms)) { $catalogCats = $terms; } } @endphp

{{ $col['title'] }}

@if ($hasMenu) {!! wp_nav_menu([ 'theme_location' => $col['menu_location'], 'container' => false, 'echo' => false, 'menu_class' => '', 'fallback_cb' => false, ]) !!} @elseif (! empty($catalogCats))
    @foreach ($catalogCats as $cat)
  • {{ $cat->name }}
  • @endforeach
@elseif (! empty($col['demo']))
    @foreach ($col['demo'] as $link)
  • {{ $link['label'] }}
  • @endforeach
@endif
@endif @endforeach
{{ $footerLegal }}
@if (has_nav_menu('footer_legal')) {!! wp_nav_menu([ 'theme_location' => 'footer_legal', 'container' => false, 'echo' => false, 'items_wrap' => '%3$s', 'fallback_cb' => false, ]) !!} @else {{-- Demo legal links — replaced automatically as soon as the 'Footer — Pravne poveznice (dolje)' menu location is assigned in Appearance → Menus. --}} {{ __('Impressum', 'elit-gastro') }} {{ __('Kolačići', 'elit-gastro') }} {{ __('Sitemap', 'elit-gastro') }} @endif