Disable Login by Email
remove_filter( ‘authenticate’, ‘wp_authenticate_email_password’, 20 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
remove_filter( ‘authenticate’, ‘wp_authenticate_email_password’, 20 );Continue reading
add_filter( ‘login_errors’, function ( $error ) { // Edit the line below to customize the message. return ‘Something is wrong!’; } );Continue reading
/** * Add the post thumbnail, if available, before the content in feeds. * * @param string $content The post content. * * @return string */ function wpcode_snippet_rss_post_thumbnail( $content ) { global $post; if ( has_post_thumbnail( $post->ID ) ) {…Continue reading
add_filter( ‘xmlrpc_enabled’, ‘__return_false’ );Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
add_filter( ‘widget_text’, ‘do_shortcode’ );Continue reading
/** * Exclude a category or multiple categories from the feeds. * If you want to exclude multiple categories, use a comma-separated list: “-15, -5, -6”. * Make sure to prefix the category id(s) with a minus “-“. * *…Continue reading
add_filter( ‘excerpt_length’, function ( $length ) { // Number of words to display in the excerpt. return 40; }, 500 );Continue reading
function wpcode_snippet_oembed_defaults( $sizes ) { return array( ‘width’ => 400, ‘height’ => 280, ); } add_filter( ’embed_defaults’, ‘wpcode_snippet_oembed_defaults’ );Continue reading
add_filter( ‘login_display_language_dropdown’, ‘__return_false’ );Continue reading