Liquid error: include usage is not allowed in this context

chrisajax30
Tourist
5 0 3

chrisajax30_0-1610722288209.png

I get this error at the top of my header, issue happens on mobile too. I've uninstalled a majority of apps I had installed but the issue is still there! Someone please help!

 

EDIT: On Turbo 5.0 btw

0 Likes
Ninthony
Shopify Partner
1715 243 663

Go into your header.liquid file in your sections folder, or even theme.liquid in your layout folder and Ctrl + F and search for "include" -- You'll probably see something like:

 

{% include 'announcement' %}

 

 

Or something like that anyway.  Shopify recently deprecated the use of "include", you may have to change all instances you find of include to "render"

 

{% render 'announcement' %}

 

 

https://help.outofthesandbox.com/hc/en-us/articles/360050021893-There-is-an-include-usage-is-not-all...

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
chrisajax30
Tourist
5 0 3

@Ninthony 

Thanks for replying but unfortunately I still have the issue, replaced all instances of "include" with "render" but still getting the issue, any other suggestions?

 

EDIT: I just decided to reinstall the theme from scratch and reset it, issue is gone, thanks for the help tho.

0 Likes