add widget to home page(or other landings)
- Users can now add a widget to the home page or customer landing pages independently.
- To implement the widget, follow these steps:
1. Access the theme editor and create a section titled "Featured Products" if it does not already exist. 2. Select the newly created section and, on the right side of the page, choose "Select Product" to add a product with a selling plan. Ensure the selected product has a selling plan to display the widget correctly. 3. Navigate to the top of the page, click on the menu, and select "Edit Code." 4. In the Sections directory, locate and select "featured-product.liquid." 5. Insert the provided code into "featured-products.liquid," preferably after the line: {%- assign product = section.settings.product -%}. 6. Click "Save" and preview the changes to confirm the widget appears in the featured product section.
- To remove the widget, simply delete the inserted code.
- For customization of the featured product widget, the class ".page-index" can be utilized.