How to display the latest blog post first on my main menu?

How to display the latest blog post first on my main menu?

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.

Reply 1 (1)

made4Uo
Shopify Partner
3853 717 1201

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 -%}

 

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free