Jump to content

How Do I Add Dynamic Text to Multiple Pages?

Recommended Posts

I'm not sure if there's a name for what I want to do. If there is, please let me know and I can research it. I'm getting ready to start making blog entries, and I want to add text to the bottom (above the footer) of every blog page that can be updated from a single location. I'm thinking maybe a text file that I edit, and a way to have the text file displayed on each page by inserting some code.

If you know how to accomplish this, please help.

Edited by Elemino
Rephrase the title into the form of a question.
Link to comment
  • Elemino changed the title to How Do I Add Dynamic Text to Multiple Pages?
  • Replies 12
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

If you add HTML to the Blog page code injection this will be reflected on every blog page, and can be updated in just one place. It's not necessarily the ideal solution, but it would work.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
8 hours ago, Ziggy said:

If you add HTML to the Blog page code injection this will be reflected on every blog page, and can be updated in just one place. It's not necessarily the ideal solution, but it would work.

How do I determine where it will be displayed? I'm not sure which HTML function I should be looking for to do this.

Link to comment
8 minutes ago, Elemino said:

I'm not sure which HTML function I should be looking for to do this

Really depends on what you want to put there.

This is a basic heading and paragraph in HTML:

<div>
  <h3>
    Write your heading here
  </h3>
  <p>
    Write a paragraph here. Write a paragraph here. Write a paragraph here. Write a paragraph here.
  </p>
</div>

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
21 minutes ago, Ziggy said:

Really depends on what you want to put there.

This is a basic heading and paragraph in HTML:

<div>
  <h3>
    Write your heading here
  </h3>
  <p>
    Write a paragraph here. Write a paragraph here. Write a paragraph here. Write a paragraph here.
  </p>
</div>

 

This much I know. But how do I force it to appear at the bottom of the blog entry?

Link to comment
14 minutes ago, Elemino said:

But how do I force it to appear at the bottom of the blog entry?

From previous:

9 hours ago, Ziggy said:

add HTML to the Blog page code injection

Go to the Blog page settings, add to Post Blog Item Code Injection.

image.thumb.png.fce48aa672f73d14d5c4e32d4a4b0191.png

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
12 minutes ago, Ziggy said:

From previous:

Go to the Blog page settings, add to Post Blog Item Code Injection.

image.thumb.png.fce48aa672f73d14d5c4e32d4a4b0191.png

Oh, I see. That's the default location for injection. This won't work unless I'm able to select which pages it appears on. I feel this has me on the right track though. There will be multiple paragraphs, and the paragraph that appears depends on the page I want it to appear on. I may need to look into making certain Div's appear based on the code I place on the page.

Link to comment

If it is different on different issues then you should just add the text to the blog pages in the normal way, what I was suggesting would save you time to add the same text to every page.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

I don't have a solution but some observations.

I'm not sure I fully understand what @Elemino wants. It sounds as though there might be some boilerplate text bits that need to be inserted into various posts.

If this is indeed the case I'm thinking that this is a situation where one could leverage tags to trigger the text being inserted into the post.

You'd need some JavaScript to detect a tag and then insert the appropriate boilerplate text.

If you need to insert the boilerplate in various locations then instead of tags you'd use a code block or text block with a magic tag that would trigger the insertion.

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
14 hours ago, creedon said:

I don't have a solution but some observations.

I'm not sure I fully understand what @Elemino wants. It sounds as though there might be some boilerplate text bits that need to be inserted into various posts.

If this is indeed the case I'm thinking that this is a situation where one could leverage tags to trigger the text being inserted into the post.

You'd need some JavaScript to detect a tag and then insert the appropriate boilerplate text.

If you need to insert the boilerplate in various locations then instead of tags you'd use a code block or text block with a magic tag that would trigger the insertion.

This sounds exactly like what I want to do, but I definitely do not have the skill to execute. I will keep searching. Thanks for your input.

Link to comment
15 hours ago, creedon said:

I don't have a solution but some observations.

I'm not sure I fully understand what @Elemino wants. It sounds as though there might be some boilerplate text bits that need to be inserted into various posts.

If this is indeed the case I'm thinking that this is a situation where one could leverage tags to trigger the text being inserted into the post.

You'd need some JavaScript to detect a tag and then insert the appropriate boilerplate text.

If you need to insert the boilerplate in various locations then instead of tags you'd use a code block or text block with a magic tag that would trigger the insertion.

Looks like the name of what I'm looking for is a "reusable block", and from what I see from Ziggy and others is Squarespace still does not support this feature yet. That's very disappointing. I would love to figure out how to do this with code, but there may be no use at this point.

This article is what led me to this conclusion: https://wordpress.org/documentation/article/reusable-blocks/

Link to comment
  • 2 weeks later...

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.