Beyond the Blocks: Adding a Custom 'Get a Quote' Button to Your Shopify Navigation
Hey there, fellow store owners!
Ever found yourself wanting to add a specific call-to-action button, like a "Get A Quote" button, right into your Shopify store's header? Not just anywhere, but snugly nestled next to your main navigation, not off in some corner or announcement bar. It’s a super common request, and it’s exactly what Majdeline_M recently brought up in the Shopify Community forums when working with the Horizon theme.
Majdeline was looking for that precise placement – a "Get A Quote" button directly within the menu section of the header. As many of us know, while adding a "block" to the header section is usually straightforward, getting it exactly where you want it, especially right next to your navigation links, can be a bit trickier with standard theme settings.
The Challenge: Beyond Basic Header Blocks
The core of the problem, as Joshetech brilliantly explained in the thread, is that "the block approach in the header settings won’t give you the placement you’re after, it usually drops it in the utility bar or announcement area, not right next to the nav links." This is a crucial insight for anyone trying to achieve a specific design element in their header. Majdeline_M even shared their store URL (mahroum-hydraulics-3.myshopify.com/) and password (Salsal) to help others visualize the exact spot. That kind of collaborative spirit is what makes the Shopify community so valuable!
Here's a visual example from devcoders showcasing a button already added, though Majdeline was looking for a slightly different placement:

Community-Driven Solutions for Perfect Placement
The community quickly rallied, offering solid approaches. Here’s a breakdown of the best strategies, synthesizing the excellent advice from Joshetech, eva_greene, and xixify.
Option 1: Leveraging Theme Settings (The Easiest Starting Point)
As xixify suggested, always check your theme settings first. Many modern Shopify themes might have a "Custom Links" or "Menu Links" setting within:
Online Store → Customize → Header Section → Menu or Custom Links
You might be able to add a link here and then use some CSS to make it look like a button. This is the least invasive method and should always be your first stop. However, as Majdeline's original question implies, this often doesn't give you the exact structural placement needed.
Option 2: Direct Liquid File Editing (The Most Control)
When theme settings fall short for that pixel-perfect placement, diving into your theme's Liquid files is the way to go. Both Joshetech and eva_greene strongly advocated for this, and it's where you get full control.
The general idea is to locate where your main navigation menu is rendered in your theme's header Liquid file and then insert your button's HTML code right there. Joshetech mentioned looking for or tags within header.liquid or sections/header.liquid. This is where your theme constructs the navigation.
Step-by-Step: Adding Your "Get A Quote" Button with Code
Here’s how you can implement this, drawing from the excellent advice shared:
- Backup Your Theme: This is critical. Before any code changes, go to Online Store → Themes, find your current theme, click Actions → Duplicate. This creates a safe copy you can revert to.
- Access Theme Code: From your Shopify admin, go to Online Store → Themes. Find your active theme, click Actions → Edit Code.
- Locate the Header File: You'll primarily be looking for
header.liquidor a file within thesectionsfolder likesections/header.liquid. - Find the Navigation Menu: Scan for the code that renders your main navigation. Look for HTML tags like
,, or specific Liquid includes that generate your menu. You want to place your button code immediately after this navigation structure. A simplified example might be:{%- for link in linklists[section.settings.menu].links -%}- {{ link.title }}
{%- endfor -%} - Insert Your Button Code: Once you've found the right spot, insert an anchor tag (
) linking to your "Get A Quote" page. Here's a version combining suggestions from eva_greene and xixify:Get A QuoteI’ve added a couple of common button classes (
button button--primary) that many Shopify themes already have, which can help it look good out-of-the-box. Adjust these if your theme uses different button classes. - Create Your "Get A Quote" Page (If You Haven't Already): As xixify reminded us, make sure you actually have a page for this button to link to! Go to Online Store → Pages → Add Page. Create a page titled "Get A Quote." You can then embed a contact form using Shopify's built-in options or a free app like "Inquiry Form" or "Contact Form" from the Shopify App Store.
- Style Your Button with CSS: The button you just added will likely just look like a plain link. To make it pop, add some CSS. Go back to Online Store → Themes → Edit Code, and look for your theme's main CSS file (e.g.,
theme.css,base.css, or withinassets). Add styles for your.header__quote-buttonclass:.header__quote-button { display: inline-block; padding: 10px 20px; background-color: #007bff; /* Or your brand color */ color: white; text-decoration: none; border-radius: 5px; margin-left: 15px; /* Adjust spacing as needed */ transition: background-color 0.3s ease; } .header__quote-button:hover { background-color: #0056b3; /* Darker shade on hover */ }Remember to adjust colors, padding, and margins to match your theme's aesthetic.
- Test Thoroughly: Save your changes and visit your live store. Check the button on different screen sizes (desktop, tablet, mobile) to ensure it looks and functions correctly.
This approach gives you the ultimate control over placement and styling. As Joshetech cautioned, some themes might use a "compiled/minified Liquid setup," which can make direct edits a bit trickier, but the principle remains the same. If you're not comfortable digging into code, eva_greene's advice to "consider a developer for safe edits" is always a wise one. It’s better to invest a little in expertise than to risk breaking your live store.
The beauty of the Shopify community is that you don't have to tackle these challenges alone. Seeing how Majdeline_M's question sparked such helpful, detailed responses from folks like devcoders, Joshetech, eva_greene, and xixify really shows the power of collective knowledge. Whether you're using Horizon or another theme, these principles for custom header buttons will serve you well, empowering you to create a more effective and user-friendly storefront.