Chrayons Posted January 22, 2022 Posted January 22, 2022 I want to add a "back" button as pagination. I have pagination currently removed with a code in custom css, but is there a way to make the 2 buttons be one single button that lets people go back to the last page they were on? So for example, If I was on on my Design Portfolio grid, and clicked into one of my Projects, there would be an automatic button on the bottom of that Project's page that links the viewer BACK to the Design Portfolio grid. Thanks so much!
tuanphan Posted January 25, 2022 Posted January 25, 2022 (edited) Add to Settings > Advanced > code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> jQuery(document).ready(function($) { $('<section id="back-to" class="Index-page"><div class="sqs-block-button button-block Index-page-content"><div class="sqs-block-button-container sqs-block-button-container--center"><a href="/portfolio" class="sqs-block-button-element--small sqs-button-element--primary sqs-block-button-element">Back to Portfolio</a></div></div></section>').insertAfter('.item-pagination[data-collection-type^="portfolio"]'); }); </script> <style> section#back-to { margin-bottom: 20px; } </style> Tested on my demo site. If it doesn't work on your site, please share link to portfolio page, we can check easier Edited January 5, 2023 by tuanphan update latest jquery version + button missing a class name Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
BLK Posted December 3, 2023 Posted December 3, 2023 Hi, This code works great but can you get the back to portfolio button to be in line with the pagination please? Thank you!!
tuanphan Posted December 4, 2023 Posted December 4, 2023 6 hours ago, BLK said: Hi, This code works great but can you get the back to portfolio button to be in line with the pagination please? Thank you!! Can you share link to a portfolio page? We can check it again easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
tuanphan Posted October 7 Posted October 7 On 12/4/2023 at 3:37 AM, BLK said: Hi, This code works great but can you get the back to portfolio button to be in line with the pagination please? Thank you!! I updated code here Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment