Jump to content

how to change itemPagination from showing in the css as <h2>

Recommended Posts

I know you can change the look of the itemPagination in the styling, but when you look into the css code it will still be written as <h2> which is not great for my SEO on my blog. 

For example on this page: https://nomadsinnature.com/blog/how-to-winterize-a-travel-trailer

At the very bottom of the post where previous and next posts show up, it is displaying as <p> font, but when I look at "view page source" it shows up as an <h2> style and I don't want it to be in a heading bc that gives google the wrong impression of the main topics on this post (hurting my rankings). 

Please help! 

Screen Shot 2023-11-11 at 11.11.50 AM.png

Link to comment
  • Replies 4
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

27 minutes ago, nomadsinnature said:

I know you can change the look of the itemPagination in the styling, but when you look into the css code it will still be written as <h2> which is not great for my SEO on my blog. 

For example on this page: https://nomadsinnature.com/blog/how-to-winterize-a-travel-trailer

At the very bottom of the post where previous and next posts show up, it is displaying as <p> font, but when I look at "view page source" it shows up as an <h2> style and I don't want it to be in a heading bc that gives google the wrong impression of the main topics on this post (hurting my rankings). 

Please help! 

Screen Shot 2023-11-11 at 11.11.50 AM.png

Add these code on Custom CSS panel in Website Utilities Website Tools > Code Injection. In the Header section

<script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
<script>
$(function(){
   $('#itemPagination h2').replaceWith(function(){
    return $("<a />").append($(this).contents());
   });
});
</script>

 

Screenshot_381.png

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
1 hour ago, nomadsinnature said:

@Web_Solutions thank you for the response but unfortunately that code didn't work. it still shows as an <h2> in the next/previous posts at the bottom of my blog posts. 

Where did you add this code? Can you send me a screenshot?

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment

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.