GraceLS Posted September 2, 2020 Share Posted September 2, 2020 Site URL: https://www.craft.org.au/craftcontemporaryprogramming Hi Squarespace community! I am hoping someone can please assist with some code to inject into an event list (not site wide, just an event list) that allows you to customise the URL and display text (<-- Back to All Events) thanks so much! Link to comment
tuanphan Posted September 2, 2020 Share Posted September 2, 2020 Can you share link to event in screenshot? We can check easier. 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
GraceLS Posted September 2, 2020 Author Share Posted September 2, 2020 Hi tuanphan, sure! Here is a link https://www.craft.org.au/craft-contemporary-events/from-idea-to-reality I would like to customise 'Back To All Events' text and URL that is displayed in the top left hand corner below the logo if that is possible. Thanks so much! 🙂 Link to comment
tuanphan Posted September 2, 2020 Share Posted September 2, 2020 Add to Home > Settings > Advanced > Code Injection > Footer <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> jQuery(function($){ $(".eventitem-backlink").html(function() { return $(this).html().replace("Back to All Events", "New text"); }); }); </script> clairebrear 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
GraceLS Posted September 2, 2020 Author Share Posted September 2, 2020 Hi Tuan that is fantastic thank you! The code worked and updated the 'Back to All Events' text, thanks so much for your help! I am hoping to now replace the link for that text and link that text to a different url (this URL (which is the overview of all events) https://www.craft.org.au/craftcontemporaryprogramming) i.e replace the link for the 'Back to Craft Contemporary Hub' text Link to comment
tuanphan Posted September 2, 2020 Share Posted September 2, 2020 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> jQuery(function($){ $(".eventitem-backlink").html(function() { return $(this).html().replace("Back to All Events", "New text"); }); $('.eventitem-backlink').attr('href','https://beaverhero.com'); }); </script> replace beaverhero with new url GraceLS 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
GraceLS Posted September 3, 2020 Author Share Posted September 3, 2020 Thank you Tuan you have saved the day! 🙂 Link to comment
nathanchien Posted February 26, 2021 Share Posted February 26, 2021 @tuanphan Thanks for this! Unfortunately this is not working with Ajax enabled for me. Any ideas why that would be? Working on a 7.0 Brine site. Thanks! Link to comment
creedon Posted February 26, 2021 Share Posted February 26, 2021 @nathanchien Please post the URL for your event page on your site. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as best , and see my profile. Thanks for your support! 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