earthwindflowermoon Posted April 1, 2022 Share Posted April 1, 2022 Site URL: https://evolutionofbrilliance.squarespace.com/ Hello, I am using the below header code injection to limit summary excerpt's... (this has been successful when inserted into main 'blog' page) <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 () { $('.summary-excerpt p').addClass('cuttext'); $('.cuttext').limitText({ length: 160 }); }) </script> My issue is with the index homepage as I am using the summary block for a few different sections - in one instance I need the excerpt limited (I want this limited on the orange blog 'latest articles' section) but for blue 'testimonials' section, I need the full excerpt. Is there a way to have these two variations on an index page? Thank you Pw: 123456 Link to comment
tuanphan Posted April 2, 2022 Share Posted April 2, 2022 Try editing your code to <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 () { $('.summary-v2-block:not(#block-yui_3_17_2_1_1648778322242_4527) .summary-excerpt p').addClass('cuttext'); $('.cuttext').limitText({ length: 160 }); }) </script> earthwindflowermoon and EarvinChong 1 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
earthwindflowermoon Posted April 4, 2022 Author Share Posted April 4, 2022 Genius!!! 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