Shopify themes, liquid, logos, and UX
Hi there,
I want to move the below back button above 'you may also like this'. Can someone help me with this?
Store theme:- Debut
Solved! Go to the solution
This is an accepted solution.
@ibarry3393,
1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:
<script>
function moveButton(){
try{
var $child = document.querySelector(`#backToCollection`);
var $parent = document.querySelector(`#shopify-section-product-recommendations`);
if (!$child || !$parent){
return;
}
var moveDOMElement = (parent,child) => parent.appendChild(child)
moveDOMElement($child, $parent);
}catch(err){}
}
moveButton();
</script>
Kind regards,
Diego
@ibarry3393- if the button is part of this section then it can be moved, also can you please provide me the preview link of the page? current link asking or login
This is an accepted solution.
@ibarry3393,
1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:
<script>
function moveButton(){
try{
var $child = document.querySelector(`#backToCollection`);
var $parent = document.querySelector(`#shopify-section-product-recommendations`);
if (!$child || !$parent){
return;
}
var moveDOMElement = (parent,child) => parent.appendChild(child)
moveDOMElement($child, $parent);
}catch(err){}
}
moveButton();
</script>
Kind regards,
Diego
Hii, @ibarry3393
Kindly share your store password so,
I can solve it perfectly.
Thank You.
Done thanks guys!
By 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, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024