Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Adding text content above blog page on 7.0


Monojono
Go to solution Solved by tuanphan,

Question

Posted (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 by Monojono
Link to post
  • Answers 6
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

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(f

Posted Images

6 answers to this question

Recommended Posts

  • 0
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>

image.thumb.png.4d004156588454a91397de113fa36b35.png

Link to post
  • 0
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;
}

image.thumb.png.204aebe328df7c9748696d1eda7c4866.png

Link to post
  • 0

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:
1546753099_ScreenShot2021-06-03at5_47_18PM.thumb.png.b336efed59e3540398bbad3d709a522a.png



Any ideas would be greatly appreciated, thanks so much!

Link to post
  • 0
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:
1546753099_ScreenShot2021-06-03at5_47_18PM.thumb.png.b336efed59e3540398bbad3d709a522a.png



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?

Link to post
  • 0
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 post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...