sarahrab Posted October 27, 2023 Share Posted October 27, 2023 I need help directing the "read more" links to the source URL for each post in the summary block. The images and titles are correctly linked to the source URL, but "read more" is bringing me to the internal blog page. How can I make it direct to the source URL? Page: https://cdlri.squarespace.com/mission pw: CDLRI Link to comment
Solution tuanphan Posted October 29, 2023 Solution Share Posted October 29, 2023 Don't remove any code in your current code. Add this code to Last Line in Code Injection > Footer <script> $(".summary-item").click(function(){ window.location=$(this).find(".summary-title a").attr("href"); return false; }); </script> Johnny87632 and tom43654329 1 1 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!) Link to comment
sarahrab Posted October 29, 2023 Author Share Posted October 29, 2023 @tuanphan Hm, this code makes the "read more" link start to load the source URL, but then it quickly redirects back to the current page (https://cdlri.squarespace.com/mission). Link to comment
tuanphan Posted November 3, 2023 Share Posted November 3, 2023 On 10/30/2023 at 4:57 AM, sarahrab said: @tuanphan Hm, this code makes the "read more" link start to load the source URL, but then it quickly redirects back to the current page (https://cdlri.squarespace.com/mission). I see it works here. Can you check it again? 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!) Link to comment
sarahrab Posted November 5, 2023 Author Share Posted November 5, 2023 You're right, it works when I try it in an incognito window. Thank you! Link to comment
Dovely2023 Posted November 14, 2023 Share Posted November 14, 2023 Hi @tuanphan Thank you. How do we alter this to open in a new window? I tried adding the window.open _blank but it's not working. Appreciate your help! Link to comment
Dovely2023 Posted November 17, 2023 Share Posted November 17, 2023 On 11/14/2023 at 12:38 PM, Dovely2023 said: Hi @tuanphan Thank you. How do we alter this to open in a new window? I tried adding the window.open _blank but it's not working. Appreciate your help! Hi @tuanphan just following up on this. Thank you for the help! Link to comment
tuanphan Posted November 20, 2023 Share Posted November 20, 2023 On 11/18/2023 at 3:19 AM, Dovely2023 said: Hi @tuanphan just following up on this. Thank you for the help! Can you share link to summary? I can test code 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!) Link to comment
Dovely2023 Posted November 20, 2023 Share Posted November 20, 2023 12 hours ago, tuanphan said: Can you share link to summary? I can test code again easier Yes, here you go. Let me know if you need anything. Thank you. https://www.thedoveagency.com/home-2 - the go-to resource library section https://www.thedoveagency.com/blog - wingbeats section https://www.thedoveagency.com/blogs - on the actual blog page, the link is still going to the built-in post page - is there a way to make this go to the outbound link a new window? Appreciate your help! Link to comment
Dovely2023 Posted November 28, 2023 Share Posted November 28, 2023 On 11/20/2023 at 9:11 AM, Dovely2023 said: Yes, here you go. Let me know if you need anything. Thank you. https://www.thedoveagency.com/home-2 - the go-to resource library section https://www.thedoveagency.com/blog - wingbeats section https://www.thedoveagency.com/blogs - on the actual blog page, the link is still going to the built-in post page - is there a way to make this go to the outbound link a new window? Appreciate your help! Hi @tuanphan just following up on this. Let me know if you have any questions. Thank you! Link to comment
Dovely2023 Posted November 30, 2023 Share Posted November 30, 2023 On 11/17/2023 at 2:19 PM, Dovely2023 said: Hi @tuanphan just following up on this. Thank you for the help! Hi @tuanphan just following up on this. Thank you for your help! Link to comment
tuanphan Posted December 1, 2023 Share Posted December 1, 2023 On 11/20/2023 at 10:11 PM, Dovely2023 said: Yes, here you go. Let me know if you need anything. Thank you. https://www.thedoveagency.com/home-2 - the go-to resource library section https://www.thedoveagency.com/blog - wingbeats section https://www.thedoveagency.com/blogs - on the actual blog page, the link is still going to the built-in post page - is there a way to make this go to the outbound link a new window? Appreciate your help! On 11/15/2023 at 1:38 AM, Dovely2023 said: Hi @tuanphan Thank you. How do we alter this to open in a new window? I tried adding the window.open _blank but it's not working. Appreciate your help! in code I sent above try window.location to window.open 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!) Link to comment
tarasollman Posted March 12 Share Posted March 12 @tuanphan I'm having this same issue (trying to get the "read more" link on a summary block point to the Source URL instead of the blog post on SS). None of the code I've found above or elsewhere seems to help. Can you (or anybody) assist me? Site url: https://turquoise-caterpillar-n778.squarespace.com/news PW: WITCHES Link to comment
tuanphan Posted March 15 Share Posted March 15 On 3/12/2024 at 7:41 PM, tarasollman said: @tuanphan I'm having this same issue (trying to get the "read more" link on a summary block point to the Source URL instead of the blog post on SS). None of the code I've found above or elsewhere seems to help. Can you (or anybody) assist me? Site url: https://turquoise-caterpillar-n778.squarespace.com/news PW: WITCHES I see it already open Source Url 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!) Link to comment
maddieturnbull Posted July 30 Share Posted July 30 (edited) @tuanphan I tried using the code above but it didn't work. I currently have the below but I want the button to link to the source url. Site: https://manatee-saxophone-eflm.squarespace.com/ Password: kingfish <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script><script>jQuery(function($){ $("a.summary-read-more-link").html(function() {return $(this).html().replace("Read More →", "Book now");});});</script> and .sqs-block-summary-v2 .summary-item-record-type-text .summary-read-more-link { background: #000000; padding: 10px; /*How much padding you want the button to have internally*/ color: #ffffff; /*Colour of the text when user hovers. Change hex value to change colour*/ width: 35%; /*How much of the summary block item you would like the button to cover, horizontally*/ text-align: center !important; /*Use left, right or center*/ margin-top: 30px !important; /*Margin between button and text above*/ transition: 0.2s; /*Transition speed. Increase for slower, decrease for faster*/ font-family: OstiaAntica-LightItalic !important; text-transform: uppercase; /*Use uppercase, lowercase or capitalize*/ &:hover { background: #383637; /*Background of the button when user hovers. Change hex value to change colour*/ color: #ffffff; /*Colour of the text when user hovers. Change hex value to change colour*/ transition: 0.2s; /*Transition speed. Increase for slower, decrease for faster*/ } } Edited July 30 by maddieturnbull Link to comment
tuanphan Posted August 1 Share Posted August 1 On 7/30/2024 at 8:38 AM, maddieturnbull said: @tuanphan I tried using the code above but it didn't work. I currently have the below but I want the button to link to the source url. Site: https://manatee-saxophone-eflm.squarespace.com/ Password: kingfish <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script><script>jQuery(function($){ $("a.summary-read-more-link").html(function() {return $(this).html().replace("Read More →", "Book now");});});</script> and .sqs-block-summary-v2 .summary-item-record-type-text .summary-read-more-link { background: #000000; padding: 10px; /*How much padding you want the button to have internally*/ color: #ffffff; /*Colour of the text when user hovers. Change hex value to change colour*/ width: 35%; /*How much of the summary block item you would like the button to cover, horizontally*/ text-align: center !important; /*Use left, right or center*/ margin-top: 30px !important; /*Margin between button and text above*/ transition: 0.2s; /*Transition speed. Increase for slower, decrease for faster*/ font-family: OstiaAntica-LightItalic !important; text-transform: uppercase; /*Use uppercase, lowercase or capitalize*/ &:hover { background: #383637; /*Background of the button when user hovers. Change hex value to change colour*/ color: #ffffff; /*Colour of the text when user hovers. Change hex value to change colour*/ transition: 0.2s; /*Transition speed. Increase for slower, decrease for faster*/ } } Which page are you referring to? I dont' see button on homepage 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!) Link to comment
maddieturnbull Posted August 5 Share Posted August 5 On 8/1/2024 at 9:34 PM, tuanphan said: Which page are you referring to? I dont' see button on homepage @tuanphan https://manatee-saxophone-eflm.squarespace.com/whats-on Link to comment
HoaLT Posted August 6 Share Posted August 6 On 7/30/2024 at 8:38 AM, maddieturnbull said: @tuanphan I tried using the code above but it didn't work. I currently have the below but I want the button to link to the source url. Site: https://manatee-saxophone-eflm.squarespace.com/ Password: kingfish <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script><script>jQuery(function($){ $("a.summary-read-more-link").html(function() {return $(this).html().replace("Read More →", "Book now");});});</script> and .sqs-block-summary-v2 .summary-item-record-type-text .summary-read-more-link { background: #000000; padding: 10px; /*How much padding you want the button to have internally*/ color: #ffffff; /*Colour of the text when user hovers. Change hex value to change colour*/ width: 35%; /*How much of the summary block item you would like the button to cover, horizontally*/ text-align: center !important; /*Use left, right or center*/ margin-top: 30px !important; /*Margin between button and text above*/ transition: 0.2s; /*Transition speed. Increase for slower, decrease for faster*/ font-family: OstiaAntica-LightItalic !important; text-transform: uppercase; /*Use uppercase, lowercase or capitalize*/ &:hover { background: #383637; /*Background of the button when user hovers. Change hex value to change colour*/ color: #ffffff; /*Colour of the text when user hovers. Change hex value to change colour*/ transition: 0.2s; /*Transition speed. Increase for slower, decrease for faster*/ } } Your above code only replace the text Read more to Book Now Based on @tuanphan share code, we can change a little bit to match on your site <script> $('.summary-read-more-link').click(function(){ window.location=$(this).closest(".summary-item").find('.summary-thumbnail-container.sqs-gallery-image-container').attr("href"); return false; }); </script> Hope it can help tuanphan 1 Press 👍 or mark my comment as solution if you find my sharing useful 🆒 Squarespace pinchzoom lightbox plugin (affiliate link) 👁🗨 360 degree photo viewer (affiliate link) Link to comment
maddieturnbull Posted August 8 Share Posted August 8 @HoaLT that works, thank you so much! HoaLT 1 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