Skip to content

Instantly share code, notes, and snippets.

View codenathan's full-sized avatar

Sakees Nathan codenathan

View GitHub Profile
@codenathan
codenathan / wordpress-security.php
Created July 22, 2021 11:26
Wordpress - Basic Security Features
<?php
//SOME BASIC WORDPRESS SECRUITY
// add this to your functions.php
add_filter('xmlrpc_enabled', '__return_false');
remove_action('wp_head', 'rsd_link'); //removes EditURI/RSD (Really Simple Discovery) link.
remove_action('wp_head', 'wlwmanifest_link'); //removes wlwmanifest (Windows Live Writer) link.
@codenathan
codenathan / hide_google_recaptcha_except_contact_page.php
Created July 22, 2021 11:24
WordPress - Hide Google Recaptcha Except Contact Page
<?php
/* CONTACT FORM 7 */
// This code enables to disable contact form 7 from loading on every page except the contact page
// This form also disables the Google recaptcha from loading on every page
// add the following in your functions.php