Skip to main content

How to Find CSS Selectors for the Header Icon

This guide helps you place the Wishlist icon (Heart) in your website's header, usually next to your Cart or Account icon.

Updated over a week ago

This guide helps you place the Wishlist icon (Heart) in your website's header, usually next to your Cart or Account icon.

To do this, you need to tell the Swym app exactly where the header controls are located. You will need to fill in two fields in your Launch Point settings:

  1. CSS Selector — Desktop & Tablet: Where the icon appears on big screens.

  2. CSS Selector — Mobile: Where the icon appears on phones.

(Note: Even if your desktop and mobile headers look the same, you must fill in both fields to save your settings.)


Before you inspect your code, check if your Shopify theme is listed here. If it is, simply copy and paste these codes.

Theme Name

CSS Selector — Desktop & Tablet

CSS Selector — Mobile

Dawn / Spotlight

.header__icons

.header__icons

Horizon

cart-drawer-component.cart-drawer

cart-drawer-component.cart-drawer

Atelier

.header-actions

.header-actions

(If your theme isn't listed, follow the steps below to find your specific code.)


How to Find Selectors Manually

Step 1: Find the Desktop Container

We need to find the "invisible box" that holds your current header icons (like Search, Login, and Cart).

  1. Open your website on a computer.

  2. Right-click on your Cart Icon (or Account icon) in the header.

  3. Select Inspect.

  4. In the code panel, move your mouse up slightly to find the Container.

    • Do not select the <a> tag (that is just the cart link).

    • Look for the line above it (usually a <div>, <ul>, or <nav>) that makes ALL the header icons turn blue at the same time.

  5. Copy the Class name or ID of that container (e.g., header__icons or header-actions).


Step 2: Find the Mobile Container

Mobile menus often live in a completely different part of the code, so we need to find them separately.

  1. Resize your browser window: Grab the edge of your browser and drag it to make it very narrow, until your website switches to the "Mobile View" (you will likely see a "Hamburger" menu ☰).

  2. Right-click on the Cart Icon (or Search icon) visible on this mobile view.

  3. Select Inspect.

  4. Just like before, look for the container code that wraps the mobile icons.

    • Tip: If your theme uses the exact same header for mobile and desktop, this code might be the same as Step 1. That is okay! You still need to find it to be sure.


Step 3: Format and Paste

Remember the rules for formatting your code:

  • Classes: If the code says class="header__icons", you type .header__icons (Add a dot).

  • IDs: If the code says id="site-header", you type `#site-header` (Add a hash).

Where to paste:

  1. Open your Wishlist Plus Admin Dashboard.

  2. Navigate to Configurations → Help Shoppers Save Favorites Quick Actions → Launch Icon

  3. Paste your codes into the Desktop and Mobile fields.

  4. Click Save.


Troubleshooting

  • "Mobile CSS selector is required" Error: You must put text in the Mobile box. If your desktop and mobile headers are identical, just paste the Desktop code into the Mobile box too.

  • Icon looks messy? If the heart icon sits on top of your cart icon, you probably selected the Cart itself instead of the Parent Container. Try finding the line of code one step higher in the hierarchy.

  • Still stuck? Email our support team at [email protected] with the name of your theme, and we will help you find the right selectors.

Did this answer your question?