Jump to content

[Share] Reuse Newsletter Block

Recommended Posts

Posted

Description:

  • Reuse a newsletter block across multiple pages, and edit it all from a single page.
  • Require a custom plugin

If you can't make it work, you can send site url, I can check problem easier

#1. First, you need to install Section Loader Supreme plugin

https://www.will-myers.com/products/p/section-loader-supreme

you can use code 
TUAN
to get 10% discount

#2. Create a page in Not Linked with Name/URL

  • Name: Reuse Newsletter
  • URL Slug: /reuse-newsletter

image.png.f80b9266a0d1f2f30106a48660343563.png

#3. Edit Reuse Newsletter page and Add a Newsletter Block

image.png.d8ee3a94ab43c2e31b568339906d279b.png

#4. Insert this Code Block where you want the newsletter block to appear. And paste this code into Code Block

<div data-wm-plugin="load" data-target="/reuse-newsletter"></div>

For example

image.thumb.png.c6362b4ead2084c86ceeb9f47bdbe15a.png

Result

image.thumb.png.690a77ee1920e732d84ef55f96875dc2.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 4 weeks later...
  • Replies 1
  • Views 501
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Posted (edited)

Update 2: If you want to add this Newsletter to All Blog Posts - Above Pagination, you can

Edit step #4, add code to Post Blog Item Code Injection

<div data-wm-plugin="load" data-target="/reuse-newsletter"></div>

image.thumb.png.63e332065cddb3505650178594be02e1.png

Next, use this code under it or Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
document.addEventListener('wmSectionLoader:loaded', ({detail}) => {
  if (detail.target !== '/reuse-newsletter') return;
  $('div.wm-load-container').insertBefore('body[class*="type-blog"].view-item section#itemPagination');

})
</script>
<style>
.wm-load-container .fluid-engine {
    justify-content: center;
}
</style>

image.thumb.png.8a7020db014d20850f18dd48964aaeab.png

Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.