To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more

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
2825 538 768

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
7149 872 1186

@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
2825 538 768

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 642 1529

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

ibarry3393
Excursionist
16 0 5