blog posts

edward1000
Visitor
2 0 1

How can i make my most recent blog post appear first when people click "BLOG" on my main menu. It always shows the oldest post.

Replies 2 (2)

made4Uo
Shopify Partner
3803 713 1114

Hi @edward1000,

 

What theme are you using? You should be able to include sorting in your articles but using the code below as reference

 

{%- assign sorted_blogs = blogs.articles | sort: "publised_at" -%}
{%- for article in sorted_blogs -%}

render you article here....

{%- endfor -%}

 

Volunteering to assist you!  Likes and Accept as Solution  is highly appreciated.✌
Coffee fuels my dedication. If helpful, a small Coffee Tip would be greatly appreciated.
Need EXPERIENCED Shopify developer without breaking the bank?
Hire us at Made4Uo.com for quick replies.
Stay in control and maintain your security by avoiding unnecessary store access!

Victoria_T
Shopify Partner
11 0 0

If I got you correctly, you can try this app https://apps.shopify.com/magefan-blog.

It has two options for blog post sorting. If you choose Publish Date, you'll see the most recent blogs first when visiting the blog index page:

Victoria_T_0-1705048275676.png

Hope this solution will work for you.