Shopify themes, liquid, logos, and UX
Hi! I cannot seem to figure out the right code to add a button to the second column in my footer under the text.
The site is coldpow.com. I would rather insert a nice button there then have to link text. Thank you!!!
Solved! Go to the solution
This is an accepted solution.
Please go to
1) Online store
2) Themes -> Edit theme
3) Sections
4) footer.liquid
First, Please try to find "{%- when 'text' -%}" and place below code. I have also attached a screenshot for the reference.
{% if block.settings.button_url and block.settings.button_label %}
<a role="link" class="button button--primary" href="{{ block.settings.button_url }}">{{ block.settings.button_label }}</a>
{% endif %}
Second, Please find "type": "text" in the Schema section and place the below code. I have also attached a screenshot. Please do not forgot to add "," after the closing curly bracket of "type": "richtext"
{
"type": "text",
"id": "button_label",
"default": "Shop Now",
"label": "Button Label"
},
{
"type": "url",
"id": "button_url",
"label": "Button URL"
}
Now, Go to theme settings -> Footer -> Text -> Here, when you will add label and url, this button will be appeared.
If it was helpful, then please like and accept it as a solution.
Thank you
Hello @talsworld
What kind of button design are you looking for? Any reference?
I tried this
This is an accepted solution.
Please go to
1) Online store
2) Themes -> Edit theme
3) Sections
4) footer.liquid
First, Please try to find "{%- when 'text' -%}" and place below code. I have also attached a screenshot for the reference.
{% if block.settings.button_url and block.settings.button_label %}
<a role="link" class="button button--primary" href="{{ block.settings.button_url }}">{{ block.settings.button_label }}</a>
{% endif %}
Second, Please find "type": "text" in the Schema section and place the below code. I have also attached a screenshot. Please do not forgot to add "," after the closing curly bracket of "type": "richtext"
{
"type": "text",
"id": "button_label",
"default": "Shop Now",
"label": "Button Label"
},
{
"type": "url",
"id": "button_url",
"label": "Button URL"
}
Now, Go to theme settings -> Footer -> Text -> Here, when you will add label and url, this button will be appeared.
If it was helpful, then please like and accept it as a solution.
Thank you
Thank you. This was truly the best way to add a button as it matched the other buttons in the theme. I can't thank you enough. Much much appreciated.
hello @talsworld
Go to online store ----> themes ----> actions ----> edit code ---->assets ---->base.css
add the code bottom of the file
.footer-block__details-content.rte h3 {
border: 2px solid white;
padding: 16px;
border-radius: 28px;
}
.footer-block__details-content.rte h3 a {
text-decoration: none;
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
- Buy me a Pizza
Hi @talsworld ,
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>
<Style>
a[href="https://www.coldpow.com/pages/feedback"] {
padding: 10px;
border: 1px solid white;
border-radius: 30px;
text-decoration: none;
background-color: white;
color: black !important;
cursor: pointer;
}
</style>
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Hello @talsworld
You can add code by following these steps
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. Paste the below code before </body> on theme.liquid
<style>
.footer-block__details-content.rte h3 a {
text-decoration: none !important;
color: #000 !important;
}
.footer-block__details-content.rte h3 {
background: #fff !important;
padding: 10px;
text-transform: capitalize;
font-weight: 700;
text-align: center;
max-width: 24rem;
}
</style>
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024