Mobile menu

The Mobile menu drawer displays your menu links, social media icons, and language and country selectors. You can choose to show feature images for collection and product links.

By default, the mobile menu displays the following features when enabled for the desktop menu in the Header settings. See the Header guide for more information.

Add mobile menu images

Add a Mobile menu images block to show images next to collection and product links.

  • Links to collections will show the feature image set in your Shopify admin. If no image is set, the menu will show the first product's image.

  • Links to products will show the first featured image set your the Shopify admin.

If you want to show a custom image, you can use metafields to assign images to collections and products.

STEPS

In your theme editor (Customize):

  1. Under Header, click (+) Add block.

  2. Select Mobile menu images and click the block to open the settings.

  1. Enter the Menu name from your Shopify admin to enable the mobile images.

    If left blank, the images will be enabled for the main menu. Add a new mobile menu images block for each separate menu.

  2. To make the thumbnail images a uniform shape, select an Image aspect ratio to crop them to Square, Landscape, or Portrait.

Select Natural to display the original shape of each image.

  1. Click Save.

Add custom images with metafields

To show a custom image, instead of the default collection or product image, you can use metafields in your Shopify admin.

  • First, set up a Collection or Products metafield. This metafield needs to have the exact Namespace stiletto.mobile_menu_thumbnail.

  • Second, add custom images to this new metafield to your products or collections in the Shopify admin.

Follow the step-by-step instructions below.

Metafields allow you to add custom content and data to specific products, collections, and pages. You can then connect metafields to your templates and sections using Dynamic sources to automatically display the correct content for different parts of your store.

STEPS

In your Shopify admin:

  1. Go to Settings > Custom data.

  2. Select Collections or Products.

  3. Click Add definition.

  4. In the Name field, enter Mobile menu thumbnail.

    The name must be this exact phrase. In the Namespace and key field, it will autopopulate to be custom.mobile_menu_thumbnail

  5. In Namespace and key, select custom and replace it with stiletto. It should now read as stiletto.mobile_menu_thumbnail.

  6. Click (+) Select type and select File.

  7. Under Validations, make sure Accept specific file types is selected, and uncheck Videos.

  8. Click Save.

To add images to your collections or products' metafields:

  1. From your Shopify admin, open your collections or products to add images.

  2. Scroll down to the Metafields area, and click the "Mobile menu thumbnail" metafield you created to select an image.

  3. Click Save.

  4. Refresh your theme editor, and the custom images should now appear.

\


Related links

Header

Last updated