Last active
August 15, 2020 18:42
-
-
Save helart/5b9570ae4aaa1d2e23f62ed118a3d3db to your computer and use it in GitHub Desktop.
This file contains 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 page_excerpt() { | |
add_post_type_support('page', array('excerpt')); | |
} | |
add_action('init', 'page_excerpt'); | |
// Отключаем поиск | |
function fb_filter_query( $query, $error = true ) { | |
if ( is_search() ) { | |
$query->is_search = false; | |
$query->query_vars[s] = false; | |
$query->query[s] = false; | |
// Ошибка | |
if ( $error == true ) | |
$query->is_404 = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment