1 Answers
Hello,
Depends on your theme, you need to edit the home page template, some themes we have like the neptun theme has latest blogs in home page https://braintree.laraship.com/ , you can use a function called getLatestPosts({number of posts}) for example
@isset($home)
<!-- ******Latest blog Section****** -->
<section id="latest-blog" class="latest-blog section">
<div class="container">
<h2 class="title text-center"> @lang('corals-neptune::labels.template.latest_posts')</h2>
<div class="row">
@foreach(\CMS::getLatestPosts(4) as $post)
<div class="item col-md-6 col-12">
<div class="item-inner">
<figure class="figure">
<a href="{{ url($post->slug) }}">
<img class="img-fluid"
src="{{ $post->featured_image }}"
alt="{{ $post->title }}"/>
</a>
</figure>
<div class="content-wrapper text-center">
<h3 class="sub-title"><a href="{{ url($post->slug) }}">{{ $post->title }}</a></h3>
<div class="desc">
<p>
{{ str_limit(strip_tags($post->rendered )) }}
</p>
</div><!--//desc-->
</div><!--//content-wrapper text-center-->
</div><!--//item-inner-->
</div><!--//item-->
@endforeach
</div><!--//row-->
</div><!--//container-->
</section><!--//latest-blog-->
@endisset
Awesome… Thank you!
🙂
Please login or Register to submit your answer