nickmohler Posted June 9, 2021 Share Posted June 9, 2021 Site URL: https://dearmarionforeveryours.squarespace.com/home/vantage-point I'm trying to figure out how to have the blog post's featured image or featured thumbnail show as an image at the top of the individual blog post. Is that possible? I see it as an option on some templates but not on the Rally template. Any help is appreciated. Thanks Link to comment
tuanphan Posted June 10, 2021 Share Posted June 10, 2021 If you use a Business Plan or higher, you can add an Image Block on top of post content. Then let me know. We will give the code to move it to top of post title. 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
nickmohler Posted June 27, 2021 Author Share Posted June 27, 2021 @tuanphan - yes the site is through a business plan. What are the next steps? Thanks Beyondspace 1 Link to comment
Beyondspace Posted June 27, 2021 Share Posted June 27, 2021 11 hours ago, nickmohler said: @tuanphan - yes the site is through a business plan. What are the next steps? Thanks Add this snippet into Advanced-Code injection- Footer <style> .BlogItem-image { height: 0; padding-bottom: 56%; position: relative; overflow: hidden; } .BlogItem-image img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }</style> <script> var blogBody = document.querySelector('.Main--blog-item [data-layout-label="Post Body"]') if (blogBody) { var featuredImage = document.querySelector('meta[property="og:image"]').getAttribute("content"); var tpl = `<div class="BlogItem-image"><img src="${featuredImage}"/></div>`; blogBody.insertAdjacentHTML('afterbegin', tpl); } </script> tuanphan 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
noahawaii Posted March 10, 2022 Share Posted March 10, 2022 This doesn't seem to work with the vester template. I don't have a live site right now to show because it's being developed. Is there something that needs to be changed in it? Link to comment
tuanphan Posted March 13, 2022 Share Posted March 13, 2022 On 3/11/2022 at 3:54 AM, noahawaii said: This doesn't seem to work with the vester template. I don't have a live site right now to show because it's being developed. Is there something that needs to be changed in it? You can setup site access password then share url. 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
noahawaii Posted March 16, 2022 Share Posted March 16, 2022 On 6/27/2021 at 1:14 AM, bangank36 said: Add this snippet into Advanced-Code injection- Footer <style> .BlogItem-image { height: 0; padding-bottom: 56%; position: relative; overflow: hidden; } .BlogItem-image img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }</style> <script> var blogBody = document.querySelector('.Main--blog-item [data-layout-label="Post Body"]') if (blogBody) { var featuredImage = document.querySelector('meta[property="og:image"]').getAttribute("content"); var tpl = `<div class="BlogItem-image"><img src="${featuredImage}"/></div>`; blogBody.insertAdjacentHTML('afterbegin', tpl); } </script> Is this page a blog post? I'm trying to figure out where squarespace pulls each blog's featured image from outside of the specific url for an image. I wasn't able to get it when the source was ${featuredImage} as you have above. Is it different for each website or how did you come up with that source? Link to comment
creedon Posted March 16, 2022 Share Posted March 16, 2022 On 3/10/2022 at 12:54 PM, noahawaii said: This doesn't seem to work with the vester template. The original code was designed for v7.0 Brine template family. Most likely it would need to be updated to work with v7.1, if it can be done. 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. Link to comment
creedon Posted March 16, 2022 Share Posted March 16, 2022 21 minutes ago, noahawaii said: Is this page a blog post? Yes that page appears to be a blog post. 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. Link to comment
noahawaii Posted March 16, 2022 Share Posted March 16, 2022 25 minutes ago, creedon said: The original code was designed for v7.0 Brine template family. Most likely it would need to be updated to work with v7.1, if it can be done. I see so that one was 7.0. Do you know where squarespace pulls the source image from in 7.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