Jump to content

[Share] Add a custom section to top of Event Detail

Recommended Posts

#1. First, edit Site Footer > Add a Section > Design layout what you want

Here is an example, I will add some contact info to this section.

and suppose this is the second section in the Footer

add-a-section-to-top-of-blog-posts-use-footer-section-01-min.png.54a97bacf2c4de459ff2396b1ae662fd.png

#2. Use this code to Custom CSS box

footer.sections section:nth-child(2) {
  display: none;
}

 

add-a-section-to-top-of-blog-posts-use-footer-section-05-min.png.cb554056bece712faa380454177e52e0.png

#3. Use this code to Code Injection - Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  jQuery(document).ready(function($){
  $('footer.sections section:nth-child(2)').insertBefore('body[class*="type-event"].view-item article>section:first-child');
})
</script>

add-a-section-to-top-of-event-detail-use-footer-section-02-min.png.c0730b95cf4bd507fd003781f2cbdf31.png

Result

add-a-section-to-top-of-event-detail-use-footer-section-03-min.png.320c332c2b7227335bd51b255b50ad89.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
  • Replies 0
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.