.htaccess rules for blocking bots with an extra condition

Try it like this: RewriteCond %{HTTP_USER_AGENT} (ADmantX|Proximic|Barkrowler|X-Middleton) [NC] RewriteRule ^ – [F] This will block any request where the User-Agent string contains either ADmantX, Proximic, Barkrowler or X-Middleton. The NC flag makes this a case-insensitive match – whether this is strictly required or not in this example I don’t know, but generally this should be … Read more

Multisite: How can I have the admin bar (toolbar) use the language of the user instead of the language of the sub-site being viewed?

Until there is a fix for it in WordPress Core you can use this ‘dirty’ way: Switch to user locale before admin bar items are processed: add_filter( ‘admin_bar_menu’, ‘ws390690_admin_bar_in_user_locale’, 10, 1 ); function ws390690_admin_bar_in_user_locale($wp_admin_bar){ switch_to_locale( get_user_locale() ); return $wp_admin_bar; } Switch back to site locale after admin bar has been rendered: add_filter( ‘wp_after_admin_bar_render’, ‘ws390690_admin_bar_in_user_locale_back’, 10, … Read more

error code: 521