CmCfi Posted August 11, 2022 Share Posted August 11, 2022 Site URL: https://www.cryptofi.tech/events Hello, I'm trying to limit the generated excerpt for events to "X" lines/characters. For example, on this webpage (https://www.cryptofi.tech/events) the first and third entries are short enough where the entire event fits into a reasonable size, but the second event is quite long as it includes additional event information and registration information. Ideally, this would cut off at "Learn more and register here." Squarespace's built-in excerpt function does not allow links, which prevents me from using that. I also have pointer-events disabled on post titles and images (because i don't want people to access the generated events pages for things like the 1st and 3rd entries). I found this code before that I slightly edited to perhaps fit my needs, but I can't seem to get it to work and I'm not sure if I'm doing something wrong or it doesn't work in this scenario: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script src="https://www.jqueryscript.net/demo/Cropping-Text-Without-Breaking-Words-jQuery-Limit-Text/limit.text.min.js"></script> <script> $(function () { $('.eventlist-description').addClass('cuttext'); $('.cuttext').limitText({ length: 140 }); }) </script> Any ideas? A fix for individual events could also work if there's a way to just limit the second event (and easily apply to future events that may have the same issue) Thank you! Link to comment
tuanphan Posted August 14, 2022 Share Posted August 14, 2022 Hi. This is not possible from Squarespace. Event is in iframe tag. You need to customize it from tockify.com 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment