Every single Wordpress page on the website has been found to contain two body tags

I've noticed a strange issue with all my WordPress sites hosted on the same server - they are displaying an extra body tag when viewed in a browser. Upon inspecting the source code, only one body tag is present, but when the page loads, there are two.

This problem seems to be affecting most of the sites I currently have hosted, and even a few that were fine this morning are now experiencing the same issue. I've tried viewing them in different browsers, both while logged into the admin panel and not, and the issue remains. It occurs on the main site as well as the admin backend.

Here's what I'm currently observing:

<script src="/google_analytics_auto.js"></script></head>
<body class=" customize-support"><body>

<div id="wrapper" style="opacity: 1;">
    <div id="header">

When examining the source code:

<script src='/google_analytics_auto.js'></script></head>
<body>

<div id="wrapper">
    <div id="header">

If you Inspect Element on and then view the source, you'll see this issue. Additionally, viewing will show how this affects the layout compared to the default WordPress login page.

Answer №1

A curious case of file corruption was uncovered, suspected to be the result of a sneaky code injection. To fix the issue, all files on the server had to be downloaded locally for inspection. A particular string was identified at the end of the injected code:

==');?>

The infection had spread to crucial files like headers, configuration settings, index pages, and functions scripts. Each infected file was meticulously cleaned up by removing the injected code before being re-saved. The sanitized files were then uploaded back to the server, effectively resolving the problem.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Step-by-step guide on incrementally counting localStorage items using jQuery

After spending an excessive amount of time on this project, I have hit a roadblock. Despite days of testing, I am unable to achieve my desired outcome. I am developing an image voting system that will track votes in localStorage. Since this is within Word ...

Issue with grid element not properly scaling using the transform:scale property

I have encountered an issue where a simple grid, with the gaps set to 0, displays a small line when I apply the transform:scale(1.5) css property. I am unsure if this is a bug or if I am doing something incorrectly. Interestingly, the result in Firefox dif ...

Trouble with my dropright Bootstrap menu getting cropped

I am currently working on creating a scrollable sidebar that includes a bootstrap dropright function. The goal is for the menu to appear on the right-hand side when a user clicks on an item in the sidebar. I have successfully implemented the scrollable f ...

Blank advertisements displayed on WordPress due to Google AdSense malfunction

My website on Wordpress can be found at . I encountered issues with the deprecated Adsense plugin for WordPress, so I created my own Adsense account. After verifying my site, I created a new ad unit and inserted its code into the body tag. The code for my ...

Hide a parent div in jQuery depending on the checkbox status

I have a code snippet that I need help with. You can view the code here. $("#filters :checkbox").change(function() { $(".listing-details > div").hide(); $("#filters :checkbox:checked").each(function() { $(".listing-details ." + $(this). ...

ajax clock encounters net::ERR_INSUFFICIENT_RESOURCES error

I recently set up an ajax php clock, but I keep encountering numerous net::ERR_INSUFFICIENT_RESOURCES errors in my console. Can anyone shed some light on why this might be happening? Below is the code responsible for calling out the clock function: $(docu ...

JavaScript visibility disappearing intermittently

I have created a custom image viewer box that overlays a thumbnail gallery page. The image viewer should appear when a user clicks on a thumbnail. However, currently, the viewer only pops up briefly and then disappears again. I am looking for a way to mak ...

Arranging h1 tags within a container id

Seeking assistance with aligning specific classes in a certain way: "left" should align to the left part of #header, "links" should be centered, and "right" should align to the right of #header. Additionally, I want the icons to align vertically with the t ...

What could be the reason why the @media print selector is not showing the correct format when I try to print?

When I click the print button, the text is supposed to display in four columns in the print dialog, but it appears as paragraphs instead. This is my script code where there is a click event for the print button. When I click on it, the print dialog pop ...

Utilizing data attributes over classes for styling in CSS

Programming Languages <span data-bar> ... </span> JavaScript span[data-bar]{ ... } Do you agree with this coding practice? Are there any potential pitfalls? I believe implementing the data- attribute is beneficial when dealing with a large ...

Executing the SQL query more than once is not permitted

I seem to be facing a challenge in executing SQL queries multiple times. In the given code snippet, the first SQL query 【SELECT h.title, h.place, h.introduction ~】works fine. However, the second one 【SELECT name ~】fails to execute. If I comment ...

Dividing one SVG into Multiple SVGs

I'm facing a challenge with loading an SVG overlay on a Google Map. The SVG file is quite large, about 50mb, resulting in a delay of around 10 seconds for it to load in the browser. One solution I'm considering is splitting the SVG into 171 smal ...

The stylesheet link for "contact.css" is unresponsive

I have been reorganizing my website portfolio by categorizing CSS, images, and other files into different folders. <link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/contact.css"> However, I am facing an issue where ...

ui-router: Issue with ui-sref causing font color to remain unchanged

I've been trying to customize the font color of a navigation link using ui-router's ui-sref functionality, but I'm facing an issue. While I can change the background color by adding it to the .active class in my CSS, the font color remains u ...

Enhance images with a dynamic hover effect using CSS on MouseOver

Looking for a hover effect on the project section of the portfolio. The layout is created using CSS Grid, and upon hovering, a responsive link to view the Live Demo should appear with animation transition. Attempted to implement the hover effect but it e ...

What is the best way to implement a hover effect that changes the opacity of images within a div?

I'm having trouble with changing the opacity of images on hover. For some reason, only the 6th picture changes opacity when I use the code: img:hover {opacity: 0.4;}. I've also attempted to target each image individually using "#prototype img[src ...

Display resize grip when hovering

Is there a way to make elements resizable using resize: both, but only show the corner handle when hovering over the element? https://i.sstatic.net/cGIYf.png I am looking for a solution to display that specific handle only on hover. ...

Tips for eliminating the border on a Twitter widget

Looking to integrate a Twitter widget into my website. The site is built using Smarty and I want to customize the widget. Currently, there is a scroll bar on the right section that I would like to remove by adding a style overflow:hidden to the class strea ...

A text box lacking the right side scrollbar

Can CSS be utilized to eliminate the right side scrollbar on a <textarea> element? ...

How can I create a fixed navigation menu in Wordpress that always stays at the top of the page?

I'm currently using the default Wordpress theme Twenty Twelve for my website located at: . My goal is to have the navigation menu always stay at the top of the page while scrolling, similar to a site called wpsites (I can't provide the link due ...