Thanks For Reply @bcworkz
The issue is being caused by the theme. When I debugged using die()
, I got the same value in the variable that I searched for on the page where the content is being rendered. I have not written any code to manipulate that value. However, I am unable to figure out where the value is being evaluated. Any suggestions would be helpful.
Below is the code for that page:
@extends('layouts.app')
@section('content')
<x-section>
<x-breadcrumb></x-breadcrumb>
@include('partials.page-header')
<header class="flex w-full content-center justify-between">
@include('partials.search-form', ['postType' => 'post', 'placeholder' => 'Search news'])
</header>
@if (!have_posts())
<x-alert type="default">
{!! __('Sorry, no results were found.', 'sage') !!}
</x-alert>
@endif
<x-article class="text-white">
<x-grid
class="not-prose !mt-12 grid-cols-1 gap-6 gap-y-6 will-change-auto max-sm:relative max-sm:flex max-sm:w-full max-sm:snap-x max-sm:snap-mandatory max-sm:overflow-x-auto max-sm:px-8 md:grid-cols-2 lg:grid-cols-3">
@while (have_posts())
@php(the_post())
@includeFirst(['partials.content-' . get_post_type(), 'partials.content'])
@endwhile
</x-grid>
</x-article>
<footer class="heir-h2:hidden heir-a:hover:text-amber-400 mt-6">
{!! the_posts_navigation([
'prev_text' => '← Prev',
'next_text' => 'Next →',
'screen_reader_text' => 'Posts Navigation',
]) !!}
</footer>
</x-section>
@endsection
And this is the breadcrumb code:
@if (!empty($items))
<nav class="-mx-2 mb-6 hidden w-full items-center space-x-3 divide-x divide-black py-2 leading-3 xl:flex"
typeof="BreadcrumbList" aria-label="Breadcrumb" vocab="https://schema.org/">
@foreach ($items as $item)
@if (empty($item['url']))
<span class="cursor-default pl-3">
{!! $item['label'] !!}
</span>
@else
<span class="pl-3" typeof="ListItem" property="itemListElement">
<a class="transition-colors hover:text-blue-700" typeof="WebPage" href="{{ $item['url'] }}"
title="Go to {!! $item['label'] !!}." property="item">
<span property="name">
@if ($loop->first)
@svg('images.icons.x-home', 'w-4 h-4', ['aria-label' => 'Home'])
@else
{!! $item['label'] !!}
@endif
</span>
</a>
<meta property="position" content="{{ $loop->iteration }}">
</span>
@endif
@endforeach
</nav>
@endif
I got the value at {!! $item['label'] !!}
as I had searched for in breadcrumb.
Thank you!
-
This reply was modified 2 weeks, 6 days ago by
popat123.