WordPress header exploit hidden div viagra links

I had a blog that it dropped down in Google and didn’t know why. I checked the source and I saw a div or another tag with display:none and containing tens of spamming links to viagra sites or other stuff like this.

This solution is for those who have in the template folderheader.php this infected tag. Even if you delete it, it will be back in a few (1-2 days max).

Solution: replace include header.php (or get_header(); ) in index.php with the content of header.php (except the infected tag with links).

Even if the header.php will still be infected, it will not be used. Did it worked ? (I explained in a hurry, I can give more details if you comment here).