simon.stjohn Posted August 17, 2023 Posted August 17, 2023 I am using an image in Card format and this allows for a hyperlink in EITHER a button OR the image - not both. Is there any way to add the link to, say, the button and then programatically add the same link to the image as well? PS: Currently i am using this in custom CSS to create the border: //Border for tour card #block-yui_3_17_2_1_1691819029172_77165, #block-yui_3_17_2_1_1692231844975_8611, #block-yui_3_17_2_1_1692234018828_9144, #block-yui_3_17_2_1_1692234018828_11038 { border: 2px solid #6600FF; border-top-left-radius: 20px; border-bottom-right-radius: 20px; padding: 20px, }
tuanphan Posted August 17, 2023 Posted August 17, 2023 You can add link to Sub Title, then we can use Script code to turn link to image (and use CSS code to make link invisible then) 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!)
simon.stjohn Posted August 17, 2023 Author Posted August 17, 2023 Hi @tuanphan Thanks again for helping me out! When you say add link to subtitle, would that be wording, like the '#1 Top Pick' or the 'Instagram highlights tour' or something else? And then what would the script be to turn link to image and CSS to make the link invisible?
tuanphan Posted August 19, 2023 Posted August 19, 2023 On 8/18/2023 at 6:32 AM, simon.stjohn said: Hi @tuanphan Thanks again for helping me out! When you say add link to subtitle, would that be wording, like the '#1 Top Pick' or the 'Instagram highlights tour' or something else? And then what would the script be to turn link to image and CSS to make the link invisible? Yes, like this link 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!)
simon.stjohn Posted August 21, 2023 Author Posted August 21, 2023 @tuanphan Got it - thanks for confirming! So what would the script be to turn link to image and CSS to make the link invisible?
tuanphan Posted August 23, 2023 Posted August 23, 2023 On 8/21/2023 at 10:58 AM, simon.stjohn said: @tuanphan Got it - thanks for confirming! So what would the script be to turn link to image and CSS to make the link invisible? Can you share link to page where you use image? We can check easier I don't remember Card Image image ID 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!)
simon.stjohn Posted August 23, 2023 Author Posted August 23, 2023 Hi @tuanphan Thanks so much - it is https://baligram.me/day-tours/top-20-bali-tours-on-getyourguide
tuanphan Posted August 26, 2023 Posted August 26, 2023 Add to Last Line in Code Injection > Footer <!-- Make link invisible --> <style> div.blog-item-inner-wrapper .design-layout-card .image-subtitle p:last-child a { display: none !important; } </style> <!-- Make image clickable --> <script> $(".blog-item-inner-wrapper .design-layout-card .intrinsic").click(function(){ window.location=$(this).find(".image-subtitle p:last-child a").attr("href"); return false; }); </script> 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!)
simon.stjohn Posted August 28, 2023 Author Posted August 28, 2023 Hi @tuanphan Thank you so much! I tried this and when I went to save the CSS it returned the error: Syntax Error on line 178 And this line had the start of your code <!-- Make link invisible --> So I am wondering if there is a problem with that line or if I needed to add something or do something different?
creedon Posted August 29, 2023 Posted August 29, 2023 (edited) Quote I tried this and when I went to save the CSS it returned the error: The code is not CSS and needs to go in Settings > Developer Tools > Code Injection > FOOTER. Edited August 29, 2023 by creedon Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
simon.stjohn Posted August 29, 2023 Author Posted August 29, 2023 Hi @creedon Oh My goodness - what a dumb moment that was! Thanks so much for the heads up mate.....! creedon 1
simon.stjohn Posted August 29, 2023 Author Posted August 29, 2023 Hi @tuanphan So thanks to Creedon, I got the code in the right place 🤪 Now what I find is when I click on the image in the card on the example page https://baligram.me/day-tours/top-20-bali-tours-on-getyourguide it's just opening the URL https://baligram.me/day-tours/undefined So I am wondering how its supposed to work - is it supposed to be picking up the URL from another element that is not defined maybe?
simon.stjohn Posted September 8, 2023 Author Posted September 8, 2023 @tuanphan Just wondering if you might have an idea what I can do to fix the issue in my last post on this? Would be very grateful for any tips! Cheers Simon
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment