• I have a page on a client’s WordPress website that repeats a section of code constantly. If i save the page, or click on another tab that I have open and return back to the page I’m editing, the code will have repeated itself.

    It’s not an issue as such since it doesn’t actually affect the appearance of the page, it’s just a lot of unnecessary code.

    Here is the code that gets repeated:

    
    </div>
    </a><a href="https://st-anns.sheffield.sch.uk/gdpr-policies/" class="info-box-link"></a>
    

    Not including the div, the bottom line of code will repeat underneath with every save or return to the page. I have absolutely no idea why this happens, or how to fix it.

    Any help would be much appreciated! Thank you

    • This topic was modified 4 years, 1 month ago by evefd23.
    • This topic was modified 4 years, 1 month ago by evefd23.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t know but whatever you are using to add GDPR statements to your site looks to be adding a new one for each save or something like that so I’d go backwards to where I first added GDPR or one of those other Policy Statements and see what I did to cause that.

    And, looking at the code, it looks like every policy statement causes a new line of code… not just the GDPR!

    Thread Starter evefd23

    (@evefd23)

    Hi @jnashhawkins ,

    Thanks for the reply.

    You’re right, it happens for every single policy. I have no idea why because I’ve copied and pasted code from another page where this repeating doesn’t occur, and the same thing happens.

    Every link on all the policies is either a link to another page, or an uploaded PDF.

    The full code for each policy is below, if this will show you anymore insight into the problem:

    <div class="col-sm-4 col-sm-offset-0 col-xs-10 col-xs-offset-1 info-box-parent">
    <a href="https://st-anns.sheffield.sch.uk/wp-content/uploads/2020/09/Acceptable-use-policy-KS1-FINAL-2020.pdf" class="info-box-link">
    <div class="info-box boxes-menu bg-blue">
    <img src="/wp-content/uploads/2019/09/acceptable-use-policy-icon.png" alt="Acceptable Use Policy KS1">
    
    ACCEPTABLE USE POLICY KS1
    
    </div>
    </a><a href="https://st-anns.sheffield.sch.uk/wp-content/uploads/2020/09/Acceptable-use-policy-KS1-FINAL-2020.pdf" class="info-box-link">
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code repeats itself with every save?’ is closed to new replies.