Created
February 20, 2019 10:35
-
-
Save zartgesotten/a85588426d81e2d8779f91f5286ba29f to your computer and use it in GitHub Desktop.
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
| if ( ! is_admin() ) { | |
| add_filter( | |
| 'query_vars', | |
| function ( $public_query_vars ) { | |
| foreach ( array( 'author', 'author_name' ) as $var ) { | |
| $key = array_search( $var, $public_query_vars ); | |
| if ( false !== $key ) { | |
| unset( $public_query_vars[$key] ); | |
| } | |
| } | |
| return $public_query_vars; | |
| } | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment