MarLo56 Posted March 16, 2021 Share Posted March 16, 2021 Site URL: https://sheep-smilodon-x2a6.squarespace.com This is the page you end up on when you click on an event in the calendar. Instead of saying "Back to All Events" I want it to say "Back to Calendar" and it want to change the URL link to the calendar page (/monthly-calendar). I've seen this question answered in the forum before but the codes don't seem to pertain to my situation. Link to comment
Solution jpeter Posted March 16, 2021 Solution Share Posted March 16, 2021 (edited) You can add the following Javascript via Code Injection. Just edit the values of the UPDATED_TEXT and UPDATED_URL variables in the code to what you want. I went ahead and used the values you provided.JavaScript (function($){ var UPDATED_TEXT = 'Back To Calendar'; var UPDATED_URL = '/monthly-calendar'; /********************************************************* * DO NOT EDIT BELOW THIS LINE **********************************************************/ if(!$) { var s = document.createElement('script'); s.src = 'https://code.jquery.com/jquery-3.6.0.min.js'; s.integrity = 'sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4='; s.crossorigin = 'anonymous'; s.onload = init; document.body.appendChild(s); } else { $(document).ready(init); } function init(){ var $backLink = $('.eventitem-backlink'); var url = UPDATED_URL || $backLink.attr('href'); var text = UPDATED_TEXT || $backLink.html(); $backLink .html(text) .attr('href', url); } })(jQuery); Make sure the code above is in between <script></script> tags. e.g.: <script> // JS code goes here </script> Edited March 23, 2021 by jpeter tuanphan and MarLo56 1 1 Link to comment
MarLo56 Posted March 17, 2021 Author Share Posted March 17, 2021 16 hours ago, jpeter said: You can add the following Javascript via Code Injection. Just edit the values of the UPDATED_TEXT and UPDATED_URL variables in the code to what you want. I went ahead and used the values you provided.JavaScript (function($){ var UPDATED_TEXT = 'Back To Calendar'; var UPDATED_URL = '/monthly-calendar'; /********************************************************* * DO NOT EDIT BELOW THIS LINE **********************************************************/ if(!$) { var s = document.createElement('script'); s.src = 'https://code.jquery.com/jquery-3.6.0.min.js'; s.integrity = 'sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4='; s.crossorigin = 'anonymous'; s.onload = init; } else { $(document).ready(init); } function init(){ var $backLink = $('.eventitem-backlink'); var url = UPDATED_URL || $backLink.attr('href'); var text = UPDATED_TEXT || $backLink.html(); $backLink .html(text) .attr('href', url); } })(jQuery); Make sure the code above is in between <script></script> tags. e.g.: <script> // JS code goes here </script> jpeter, This code was awesome and worked like a charm! Thank you so much! Link to comment
tuanphan Posted March 24, 2021 Share Posted March 24, 2021 @MarLo56 I see some blocks on tablet doesnt look good. You can add this to Design > Custom CSS > Then save & reload your site /* Fix tablet posters */ @media screen and (max-width:991px) and (min-width:768px) { div#page-section-604c098eb1aad7403ed12db2 .image-inset { padding-bottom: 200% !important; } } MarLo56 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
MarLo56 Posted March 29, 2021 Author Share Posted March 29, 2021 @tuanphan Thank you so much for noticing that issue and sending me the correction! You're amazing! The site was just published today and it fixed the problem for iPad viewing. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment