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!
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024