Help! YouTube video on the home page doesn't load

YouTube changed their API have caused some videos across free and premium Shopify themes to not play as they should. You apply this patch to fix the issue: 

You'll need to edit the theme.js.liquid file, please follow the steps below:

  1. Locate the theme.js.liquid file. Go to Online Store> Themes> Palo Alto> Actions> Edit Code> Assets Folder> theme.js.liquid file:

    https://help.shopify.com/en/manual/using-themes/change-the-layout/theme-code
  2. Find the code below via using "Command + F" or "Ctrl+F" for Windows:

    https://monosnap.com/direct/FjmddsOvfhSByaINTJN54IdV3yR1Nu
    $(event.target.a).parent().addClass('loaded');
  3. You'll then need to replace the lines highlighted in red below with code highlighted in green:

    https://gist.github.com/reinosko/7ba6ad415aa5b4a3a4524f1af9f64abf/revisions
    https://monosnap.com/direct/JgmwxkPMQW9CgyJ0MpZPWb7PH1NAfR
  4. Save the changes.

Note: Always make a backup before editing any theme code, this will help to restore to a stable point if an issue comes up due to changes. Here is instructions from Shopify on backing up your theme: https://help.shopify.com/manual/using-themes/theme-files#duplicate-themes

Still need help? Contact Us Contact Us