1
votes

I got message in Google webmaster "hacked:content injection" I found content in view source but I don't know from which file I should remove this. I can see content in all pages(2-3 lines).

2

2 Answers

0
votes

You need to use jQuery filter for remove that word.

<script type="text/javascript">
var str = $('body');
var res = str.replace('your injected html','');
<script>
0
votes

Your website has been hacked and hacker has inserted some unwanted content in your files. The content you found after view source mostly from your currently activated theme.

To know which file is affected, just install "Antivirus" plugin which is found here: https://wordpress.org/plugins/antivirus.

It is completely free plugin which provides you the ability to scan your theme files from the admin and let you know the list of all affected files. Then you must go to each listed file and remove unwanted code.

This plugin also provides daily malware scan automatically and also includes "Malware detection by Google Safe Browsing". If any malware attack comes to your website this will send you email regarding it.

It will definitely solve your problem.

One more thing, you must update your WordPress to the latest version after cleaning these affected files to stay secure. You must apply some security measures to the website to avoid future attacks.