Debut theme:- Move 'back to objects button' above 'you may like this'

Solved
ibarry3393
Excursionist
16 0 5

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

URL:-https://gallery-333.myshopify.com/admin/themes/124321857692/editor?previewPath=%2Fproducts%2Ftranqui...

 

Screen Shot 2021-10-15 at 2.41.14 PM.png

Accepted Solution (1)

Accepted Solutions
diego_ezfy
Shopify Partner
2628 485 648

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

View solution in original post

Replies 5 (5)
suyash1
Shopify Partner
5021 578 835

@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

You are welcome to contact me - suyash.patankar@gmail.com, My timezone is GMT+5:30, to build shopify pages use pagefly
diego_ezfy
Shopify Partner
2628 485 648

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

Zworthkey
Shopify Partner
5581 640 1498

Hii, @ibarry3393 
Kindly share your store password so,
I can solve it perfectly.
Thank You.

If helpful, please Like and Accept Solution. Hire Us |
if you Want to modify or Customize your theme | Whatsapp | Email us: sales@zworthkey.com
Top Rated Shopify Agency, | We have Over 200+ Happy merchants.
Build Successful Shopify Stores with GemPages
ibarry3393
Excursionist
16 0 5
ibarry3393
Excursionist
16 0 5