Created
February 14, 2019 20:43
-
-
Save alanef/4613247facf0a5ff5894d82dbfd2feac to your computer and use it in GitHub Desktop.
Disable specific author page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'template_redirect', function() { | |
| if ( is_author('nickname') ) { // change either nickname or user id see https://codex.wordpress.org/Function_Reference/is_author | |
| status_header( 404 ); | |
| get_template_part( 404 ); | |
| exit(); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment