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

Solved
ibarry3393
Excursionist
15 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
2300 413 542

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

◦ Slideshow images cutting off? Try the Slideshow (PRO) section. No apps required. | Replace apps with copy/paste code snippets & save money. Examples here.

View solution in original post

Replies 5 (5)
suyash1
Shopify Partner
3713 408 610

@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, my email - suyash.patankar@gmail.com ,My timezone is GMT+5:30
diego_ezfy
Shopify Partner
2300 413 542

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

◦ Slideshow images cutting off? Try the Slideshow (PRO) section. No apps required. | Replace apps with copy/paste code snippets & save money. Examples here.

View solution in original post

Zworthkey
Shopify Partner
2567 309 641

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

If helpful, please Like and Accept Solution.
if you Want to modify or Customize your theme ,
Hire us | Whatsapp. and we also help you to guide how to reach to your potential customers to increase brand presence, engagements and sales for your business or Want to know more. Read our Shopify Blogs.Email us: sales@zworthkey.com
ibarry3393
Excursionist
15 0 5
ibarry3393
Excursionist
15 0 5