Jump to content

Reuse newsletter sign-up block?

Recommended Posts

I couldn't find an answer to this by searching, so just wondering if there's a way to reuse a newsletter sign-up block that I've previously created. I want to put one at the end of blog posts, and don't want to have to create it every time. I see that I can name them, but it doesn't appear I can reuse those named one to plug them in with one-click.

Link to comment

You can achieve this but requires a custom plugin

First, install Section Loader Supreme Plugin (affiliate link) or this link (non-affiliate link)

Next, create a page in Not Linked

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

image.png.a496ca67f2079964d6bdd2f9c06a6479.png

Next, edit page and add a Newsletter Block

image.png.bf5e76b507649ab2a51180ea7fde2f72.png

Final, edit blog post where you want to place Newsletter > Add a Block > Choose Code > Paste this code

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

image.thumb.png.caef59aa6c7723b80d8ffed9c882b921.png

Bonus

In case you want to add a newsletter to all blog posts, above Pagination, you can use this code to Post Blog Item Code Injection

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
  setTimeout( function() {
          $('div.wm-load-container').insertBefore('body[class*="type-blog"].view-item section#itemPagination');
    }, 3000);
});
</script>

image.thumb.png.dd79792c209277b38816658efc034a8f.png

Result

image.thumb.png.d66561ad67e3b73d63a961b52a475bd4.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!)

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.