I am trying to create a static homepage custom template, with a structure like this:
- Hero
- Some images and texts
- [Blog Posts]
- Footer
The problem is my code showing posts with post type: page, instead of post type: post.
I use Sage (Roots.io)(Blade template engine), creating a template called template-home.blade.php. I've already tried to copy code from content.blade.php, and use it on my template-home.blade.php.
This is the code from content.blade.php that I use to get blog posts:
<article @php post_class() @endphp>
<header>
<h2 class="entry-title"><a href="{{ get_permalink() }}">{!! get_the_title() !!}</a></h2>
@include('partials/entry-meta')
</header>
<div class="entry-summary">
@php the_excerpt() @endphp
</div>
</article>
Expected results: It should show all posts with post type: post. Like "Blog Post Title 1", "Blog Post Title 2", etc.
Current results: Copied code show posts with post type: page. Like "Home", "About", etc.
Please help. Thank you.