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
2352 425 564

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

◦ Add a Slideshow to the Dawn theme: live preview. No apps required.
◦ Replace apps with copy/paste code snippets & save money. Examples here.
◦ Available for hire! ezfycode@gmail.com

View solution in original post

Replies 5 (5)
suyash1
Shopify Partner
4054 468 666

@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 edit shopify pages use pagefly, subscribe on youtube
diego_ezfy
Shopify Partner
2352 425 564

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

◦ Add a Slideshow to the Dawn theme: live preview. No apps required.
◦ Replace apps with copy/paste code snippets & save money. Examples here.
◦ Available for hire! ezfycode@gmail.com

View solution in original post

Zworthkey
Shopify Partner
3405 400 787

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. & Want to know more .Email us: sales@zworthkey.com

PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Designing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
ibarry3393
Excursionist
15 0 5
ibarry3393
Excursionist
15 0 5