@php global $wp_query; $title = get_the_archive_title(); $id = get_the_id(); $queried = get_queried_object(); $count = $wp_query -> post_count; // Extended description from ACF field $originalId = $queried -> cat_ID; $catId = apply_filters( 'wpml_object_id', $originalId, 'category', true ); $description = get_field('extended_description', 'category_' . $catId); $count_posts = wp_count_posts(); @endphp @extends('layouts.app') @section('content') @if (!have_posts())
{{ __('Sorry, no results were found.', 'sage') }}
{!! get_search_form(false) !!} @endif @include('partials.queried-header') @include('partials.content-archive', [ "title" => $title, "count" => $count, "description" => $description, ]) @php wp_reset_postdata(); @endphp @endsection