hello @wfgerald
thanks for checking this problem and helping me.
i did what you asked.
there is no error there –> please check this photo to see
+
please check this photo too, it the rules i’ve set (not working)
what i did extra that i felt might help :
6 – yesterday i contacted the theme author (rubybuild), at envato, themeforest.
and described the issue to them. and asked if there is something wrong with theme or any issue regarding this .
they answered today and said the theme is quality coded and tested many times.
and they also said that this is related to wordfence which is causing the issue by forcing the 404 the wrong way causing incompatibility with other plugins and codes.
7 – while the :
” Brute Force Protection > additional options > prevent discovery of username through ‘/?author=N’ scans, oEmbed API, … ” was enable
i also enabled the option : ” Disable reading of php://input ”
i thought this might help. but unfortunately the results were the same as before.
8 – i disabled option :
” Brute Force Protection > additional options > prevent discovery of username through ‘/?author=N’ scans, oEmbed API, … ” from wordfence,
and to make sure if this is the theme issue, or is it wordfence, i decided to install a free plugin called — > Disable Author Archives
and the result were 100% with no issue in 404 pages. everything went fine and worked with no problem.
for seeing the results, please click on this photo
now the ” Disable Author Archives ” plugin, has no options and it’s very simple.
i paste the code since it is free, and with permission of the author @freemp for study and improvements purposes.
the code is :
if ( ! defined( 'ABSPATH' ) ) exit;
/* Return status code 404 for existing and non-existing author archives. */
add_action( 'template_redirect',
function() {
if ( isset( $_GET['author'] ) || is_author() ) {
global $wp_query;
$wp_query->set_404();
status_header( 404 );
nocache_headers();
}
}, 1 );
/* Remove author links. */
add_filter( 'author_link', function() { return '#'; }, 99 );
add_filter( 'the_author_posts_link', '__return_empty_string', 99 );
this code done no issue and not stopped any plugin or css or etc from running.
-note : when i say that i’m testing, i mean
A – i delete browser cache, stored files and everything from the beginning of time
B – flush DNS
C – restart browser
D – use different browsers to make sure
E – click on “Save Changes” to Update WordPress Permalinks each time, after any changes.
sorry for long message,
please help me fix this.
thank you for your help.