Created
November 24, 2018 09:29
-
-
Save devfaysal/d71f7783f7f8315012a8966c7b8fb2aa 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
function custom_title($title_parts) { | |
if ( is_search() ) { | |
$title_parts['title'] = get_search_query(); | |
} | |
return $title_parts; | |
} | |
add_filter( 'document_title_parts', 'custom_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment