Hello,
I am trying to create a static homepage custom template, with a structure like this:
- Hero
- Some images and texts
- [Blog Posts]
- Footer
What should be the correct behavior:
<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>
Copied code from content.blade.php above that I use on my template-home.blade.php will show all posts with post type: post.
Like “Blog Post Title 1”, “Blog Post Title 2”, etc.
Current behavior:
Copied code above show posts with post type: page.
Like “Home”, “About”, etc.
What should I do to get the blog posts and attach it on my static homepage?