E-W Posted September 4 Share Posted September 4 I'm not sure why but Squarespace codes all portfolio list items as h1. This is horrible for SEO. Plus there should be an actual h1 on the page with some body copy. Here's some code to change the list items to h2. Paste into header code injection area. <script> document.addEventListener("DOMContentLoaded", function() { var headings = document.querySelectorAll('h1.portfolio-hover-item-title'); headings.forEach(function(heading) { var newHeading = document.createElement('h2'); newHeading.className = heading.className; newHeading.innerHTML = heading.innerHTML; heading.parentNode.replaceChild(newHeading, heading); }); }); </script> tuanphan 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment