diff --git a/wp-content/themes/dekart/page-camp.php b/wp-content/themes/dekart/page-camp.php index 90bcf12..9f8c875 100644 --- a/wp-content/themes/dekart/page-camp.php +++ b/wp-content/themes/dekart/page-camp.php @@ -28,6 +28,19 @@ add_filter( 'wpseo_frontend_presenter_classes', function( $presenters ) { // Убираем twitter:label1 / twitter:data1 (наследие article-режима) add_filter( 'wpseo_twitter_label1', '__return_empty_string' ); add_filter( 'wpseo_twitter_data1', '__return_empty_string' ); + +// Добавляем og:image:alt из featured image (совпадает с og:image от Yoast) +add_action( 'wp_head', function() { + if ( ! is_page_template( 'page-camp.php' ) ) return; + $thumb_id = get_post_thumbnail_id( get_queried_object_id() ); + if ( $thumb_id ) { + $alt = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true ); + if ( $alt ) { + echo '' . "\n"; + } + } +}, 1 ); + add_action('wp_head', function() { echo ''; }, 100); get_header(); ?> @@ -237,7 +250,7 @@ $metrics = [
Никаких уговоров по утрам. Никаких «забери меня». Только горящие глаза и «а можно ещё?»
Мы создаём среду, где каждый ребёнок раскрывает свой потенциал