add cookies

This commit is contained in:
2025-06-04 01:32:16 +03:00
parent 14fbcc73de
commit b1697d2b5a
6 changed files with 21 additions and 2 deletions

View File

@@ -268,6 +268,14 @@ add_filter( 'single_template', function ( $single_template ) {
}, PHP_INT_MAX, 2 );
//куки
function add_cookie_consent() {
if (!isset($_COOKIE['cookie_consent_accepted'])) {
get_template_part('cookie-consent');
}
}
add_action('wp_footer', 'add_cookie_consent');
#search
function my_search_order( $query ) {