Ad

Search String In Code In Shopify Liquid

- 1 answer

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)

Tried already:

  • 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.

Ad

Answer

I'm afraid I have never seen such feature on the Shopify Editor. What I usually do, however, ifShopify Editor. What I usually do, however, if you're not working with the theme locally already is:

  1. Export the theme via Download Theme File
  2. Download the .zip and extract it.
  3. Open it with your favourite Editor (I personally use Sublime)
  4. Use Find in Folder or 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 so you can take advantage of version control and a more organized workflow that could help maintenance and new updates on that site.

Ad
source: stackoverflow.com
Ad