Streaming live at 10am (PST)

CMS Next and Previous JS working, but repeated headings

I have used other forum posts to work out the JS for adding a Previous and Next link on my blog posts.

I have added headings too, using other code from previous posts.
BUT I get 2 copies of the heading.

I don’t understand the JS - I just cut and pasted and changed things as required, but obviously there’s something not right here.

Here’s the code I’m using:

<style>#post_list{display: none;}</style>

  var Webflow = Webflow || [];
  Webflow.push(function () { 
    var next_href = $('#post_list .w--current').parent().next().find('a').attr('href');
    var previous_href = $('#post_list .w--current').parent().prev().find('a').attr('href');
    var next_title = $('#post_list .w--current').parent().next().find('a').text();
var previous_title = $('#post_list .w--current').parent().prev().find('a').text();
    //if last post in list
    if(next_href == undefined) {
      next_href = $('#post_list').children().children().first().find('a').attr('href');
      $('#next_button').fadeOut(); //optional - remove if you want to loop to beginning
    //if first post in list
    if(previous_href == undefined) {
      previous_href = $('#post_list').children().children().last().find('a').attr('href');
      $('#previous_button').fadeOut();  //optional - remove if you want to loop to end
    //apply hrefs to next / previous buttons
    $('#next_button').attr('href', next_href);
    $('#previous_button').attr('href', previous_href);

I guess the problem is in the 3rd “paragraph” ???

Here is my public share link:
(how to access public share link)