I’m working in a blog that uses 3 post formats, but i’m stuck trying to figure out how to get the post format that uses to redirect the view to the right template. is there an easy way to do this?
thanks in advance
I’m working in a blog that uses 3 post formats, but i’m stuck trying to figure out how to get the post format that uses to redirect the view to the right template. is there an easy way to do this?
thanks in advance
@while (have_posts()) @php(the_post())
@include ('partials.content-'.(get_post_type() !== 'post' ? get_post_type() : get_post_format()))
@endwhile
in single.blade i’ve added
@section('content')
@while(have_posts()) @php(the_post())
<div class="grid-container">
<div class="grid-x grid-margin-x">
<div class="small-12 cell">
@include ('partials.content-single-'.(get_post_type() !== 'post' ? get_post_type() : get_post_format()))
</div>
</div>
</div>
@endwhile
@endsection
that way i can have full control on single posts
thank you @ben