Buy me a coffee

Add a Section to top of Blog Posts (Use Not Linked Page)

Add A Section To Top Of Blog Posts Use Not Linked Page 07 Min

#1. First, you add a Blank Page in Not Linked with Name/URL:

  • Name: Blog Top Section
  • URL: /blog-top-section

Add A Section To Top Of Blog Posts Use Not Linked Page 01 Min

Next, design the page layout to what you want, here is an example.

Add A Section To Top Of Blog Posts Use Not Linked Page 02 Min

#2. Install this plugin

The plugin will give you some code to add to the Code Injection Header and footer, like this.

Add A Section To Top Of Blog Posts Use Not Linked Page 03 Min

Add A Section To Top Of Blog Posts Use Not Linked Page 04 Min

#3. Add this code to the Blog Post Item Code Injection

<div data-wm-plugin="load" data-target="/blog-top-section"></div>

Add A Section To Top Of Blog Posts Use Not Linked Page 05 Min

#4. Add this code to the 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 !== '/blog-top-section') return;
  $('div.wm-load-container').insertBefore('body[class*="type-blog"].view-item article>section:first-child');
})
</script>
<style>
.wm-load-container+section {
    padding-top: 0px !important;
}
</style>

Add A Section To Top Of Blog Posts Use Not Linked Page 06 Min

Result

Add A Section To Top Of Blog Posts Use Not Linked Page 07 Min