Search string in code in Shopify Liquid
I am looking for a particular div in the Shopify Liquid files of a large-ish site I am new to and that I did not build. However, I have to check the files one by one to find if the div is there, which is unefficient. The PHPStorm editor has the ctrl+shift+F option to search the file arborescence for a specific string in any file. Does Shopify have an equivalent, and what is it?
Not to be confused with:
- Adding a search bar on a Shopify site
- Searching Shopify store admin (I need to look at the Liquid code, not the store)
- Googled 'shopify equivalent of phpstorm ctrl+shift+F'
- Googled 'shopify keyboard shortcuts'
- Googled 'shopify find in path'
- Googled 'shopify search code'
Found no relevant result.
I'm afraid I have never seen such feature on the Shopify Editor. What I usually do, however, if you're not working with the theme locally already is:
- Export the theme via
Download Theme File
- Download the .zip and extract it.
- Open it with your favourite Editor (I personally use Sublime)
Find in Folderor your text-editor equivalent to search for the string on the whole theme.
Sadly, there's no better workflow as of now. You should consider however, setting up your theme locally (https://stackoverflow.com/questions/38803486/how-to-develop-shopify-themes-locally/38814778#38814778) so you can take advantage of version control and a more organized workflow that could help maintenance and new updates on that site.
1) download locally (many devs work locally now using theme kit or another tool) unzip theme and do a search either with text editor or with file manager
2) you can also use screaming frog to scan sites in detail - may be more useful though in cases where the div is not actually technically in theme but say in a metafield or added by an app.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.