Monojono Posted May 4, 2021 Share Posted May 4, 2021 (edited) Site URL: https://www.leo2021.org/ Hi, I am attempting to add a small bit of text or an image between the navigation menu and the blog section of this site (which is set as the homepage), in order to provide a link to a blog archive at a separate URL. I am not experienced at adding custom code, but ultimately just looking for a workaround to apply to only the blog page of this site. I am hoping this will be an easy fix for someone more experienced in customizing SqSp pages, and thanks in advance for any advice! Edited May 4, 2021 by Monojono Link to comment
tuanphan Posted May 6, 2021 Share Posted May 6, 2021 On 5/5/2021 at 12:04 AM, Monojono said: Site URL: https://www.leo2021.org/ Hi, I am attempting to add a small bit of text or an image between the navigation menu and the blog section of this site (which is set as the homepage), in order to provide a link to a blog archive at a separate URL. I am not experienced at adding custom code, but ultimately just looking for a workaround to apply to only the blog page of this site. I am hoping this will be an easy fix for someone more experienced in customizing SqSp pages, and thanks in advance for any advice! Add to Design > Custom CSS /* home top text */ body.homepage div#pageWrapper:before { content: "Squarespace"; display: block; text-align: center; } 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
Monojono Posted June 3, 2021 Author Share Posted June 3, 2021 Hi @tuanphan, thanks so much for your help! This seems to work with plaintext, but when I customize to include a text link it throws an error. I've been messing with the syntax to try to fix this but no luck so far! Here is the text I am working with based on your advice: /* home top text */ body.homepage div#pageWrapper:before { content: <a href="https://leounion.org/blog">Click here </a> for all LEO Blog posts and news"; display: block; text-align: center; } I'll also include a screenshot of where it seems to create an error: Any ideas would be greatly appreciated, thanks so much! Link to comment
tuanphan Posted June 4, 2021 Share Posted June 4, 2021 17 hours ago, Monojono said: Hi @tuanphan, thanks so much for your help! This seems to work with plaintext, but when I customize to include a text link it throws an error. I've been messing with the syntax to try to fix this but no luck so far! Here is the text I am working with based on your advice: /* home top text */ body.homepage div#pageWrapper:before { content: <a href="https://leounion.org/blog">Click here </a> for all LEO Blog posts and news"; display: block; text-align: center; } I'll also include a screenshot of where it seems to create an error: Any ideas would be greatly appreciated, thanks so much! Hi. You can't add link with this way. Will need to use JavaScript. Do you use Personal Business or Commerce Plan? 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
Monojono Posted June 4, 2021 Author Share Posted June 4, 2021 1 hour ago, tuanphan said: Hi. You can't add link with this way. Will need to use JavaScript. Do you use Personal Business or Commerce Plan? Hoo boy, ok—thanks for the speedy reply! This is a business plan, not commerce, though it appears that JavaScript should be available on both from what I can see. Link to comment
Solution tuanphan Posted June 5, 2021 Solution Share Posted June 5, 2021 21 hours ago, Monojono said: Hoo boy, ok—thanks for the speedy reply! This is a business plan, not commerce, though it appears that JavaScript should be available on both from what I can see. Add to Settings . Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function() { $('<p class="ttext"><a href="https://beaverhero.com">Click here</a> to see detail</p>').insertBefore('body.homepage #page>article:first-child'); }); </script> <style> p.ttext { text-align: center; font-size: 30px; } p.ttext a { border-bottom: 1px solid; } </style> Monojono 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
Monojono Posted June 7, 2021 Author Share Posted June 7, 2021 Thanks so much, @tuanphan, that worked perfectly! Your help is very much appreciated! 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