Final. Deploy ready seo
This commit is contained in:
parent
edb6afeae0
commit
27b3f62a4b
@ -30,7 +30,7 @@
|
||||
<div class="footer__link-icon">
|
||||
<img width="19" height="32"
|
||||
src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/images/icon-location.svg"
|
||||
role="presentation" loading="lazy">
|
||||
alt="" role="presentation" loading="lazy">
|
||||
<span>г. <?php echo esc_html( carbon_get_theme_option('site_city') ); ?> <br class="mobile"> <?php echo esc_html( carbon_get_theme_option('site_address') ); ?></span>
|
||||
</div>
|
||||
<a class="footer__link-icon"
|
||||
|
||||
@ -816,7 +816,7 @@ function enqueue_template_specific_styles() {
|
||||
'template-specific-style',
|
||||
get_template_directory_uri() . '/assets/css/camp.css',
|
||||
array(),
|
||||
'1.5'
|
||||
'1.6'
|
||||
);
|
||||
wp_enqueue_script(
|
||||
'camp-script',
|
||||
|
||||
@ -18,11 +18,16 @@ add_filter( 'wpseo_frontend_presenter_classes', function( $presenters ) {
|
||||
return strpos( $p, 'Article_Modified_Time' ) === false
|
||||
&& strpos( $p, 'Article_Published_Time' ) === false
|
||||
&& strpos( $p, 'Article_Author' ) === false
|
||||
&& strpos( $p, 'Article_Publisher' ) === false;
|
||||
&& strpos( $p, 'Article_Publisher' ) === false
|
||||
&& strpos( $p, 'Label1' ) === false
|
||||
&& strpos( $p, 'Data1' ) === false;
|
||||
} );
|
||||
}
|
||||
return $presenters;
|
||||
} );
|
||||
// Убираем twitter:label1 / twitter:data1 (наследие article-режима)
|
||||
add_filter( 'wpseo_twitter_label1', '__return_empty_string' );
|
||||
add_filter( 'wpseo_twitter_data1', '__return_empty_string' );
|
||||
add_action('wp_head', function() { echo '<style>.hidden{display:none}</style>'; }, 100);
|
||||
get_header();
|
||||
?>
|
||||
@ -133,7 +138,7 @@ $metrics = [
|
||||
|
||||
|
||||
?>
|
||||
<section class="section-bg hero-media-search" data-bg="hero">
|
||||
<section class="section-bg hero-media-search" data-bg="hero" id="camp-hero">
|
||||
<div class="container">
|
||||
<div class="hero-media-search__container">
|
||||
|
||||
@ -201,7 +206,7 @@ $metrics = [
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section-bg about-us" data-bg="white">
|
||||
<section class="section-bg about-us" data-bg="white" id="camp-about">
|
||||
<div class="container">
|
||||
<div class="about-us__wrapper">
|
||||
<div class="about-us__image-col">
|
||||
@ -249,7 +254,7 @@ $metrics = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-bg suggestions" data-bg="mint">
|
||||
<section class="section-bg suggestions" data-bg="mint" id="camp-advantages">
|
||||
<div class="container">
|
||||
<div class="suggestions__header">
|
||||
<h2 id="camp-advantages" class="camp_title">Почему мамы выбирают "Декарт": дети бегут сюда сами</h2>
|
||||
@ -279,7 +284,7 @@ $metrics = [
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<section class="section-bg infograph" data-bg="white">
|
||||
<section class="section-bg infograph" data-bg="white" id="camp-infograph">
|
||||
<div class="container">
|
||||
<div class="infograph__header">
|
||||
<h2 id="camp-infograph" class="camp_title">Цифры, которые говорят сами за себя</h2>
|
||||
@ -331,7 +336,7 @@ $metrics = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-bg programs" data-bg="mint">
|
||||
<section class="section-bg programs" data-bg="mint" id="camp-programs">
|
||||
<div class="container">
|
||||
<h2 id="camp-programs" class="camp_title">Летние программы</h2>
|
||||
<div class="programs__scroll-x">
|
||||
@ -357,7 +362,12 @@ $metrics = [
|
||||
<span class="programs__price">От <?php echo number_format((int)$programs_price_global, 0, ',', ' '); ?> ₽</span>
|
||||
<span class="programs__duration">за <?php echo esc_html($programs_days); ?></span>
|
||||
</div>
|
||||
<div class="programs_content hidden"><?php echo wp_kses_post($programs_content); ?></div>
|
||||
<?php
|
||||
// Понижаем H3→H4, удаляем пустые заголовки (защита от редактора)
|
||||
$programs_fixed = preg_replace('/<h3\b([^>]*)>/i', '<h4$1>', $programs_content);
|
||||
$programs_fixed = preg_replace('/<\/h3>/i', '</h4>', $programs_fixed);
|
||||
$programs_fixed = preg_replace('/<h4[^>]*>\s*<\/h4>/i', '', $programs_fixed);
|
||||
?><div class="programs_content hidden"><?php echo wp_kses_post($programs_fixed); ?></div>
|
||||
<button class="programs__btn btn-program" aria-label="Подробнее о программе <?php echo esc_attr($programs_title); ?>">Подробнее</button>
|
||||
</div>
|
||||
</article>
|
||||
@ -369,7 +379,7 @@ $metrics = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-bg bring-child" data-bg="white">
|
||||
<section class="section-bg bring-child" data-bg="white" id="camp-pricing">
|
||||
<?php
|
||||
$price_half_day = carbon_get_post_meta($post_id, 'price_half_day' );
|
||||
$price_full_day = carbon_get_post_meta($post_id, 'price_full_day' );
|
||||
@ -445,7 +455,7 @@ $metrics = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-bg mentors" data-bg="mint">
|
||||
<section class="section-bg mentors" data-bg="mint" id="camp-mentors">
|
||||
<h2 id="camp-mentors" class="camp_title">Наши наставники и ведущие мастер-классов</h2>
|
||||
<div class="mentors__scroll-x">
|
||||
<div class="mentors-wrapper">
|
||||
@ -483,7 +493,7 @@ $metrics = [
|
||||
|
||||
</section>
|
||||
|
||||
<section class="section-bg routine" data-bg="white">
|
||||
<section class="section-bg routine" data-bg="white" id="camp-schedule">
|
||||
<h2 id="camp-schedule" class="camp_title">Распорядок дня в клубе</h2>
|
||||
<div class="routine-wrapper">
|
||||
<?php
|
||||
@ -508,7 +518,7 @@ $metrics = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-bg foto" data-bg="mint">
|
||||
<section class="section-bg foto" data-bg="mint" id="camp-gallery">
|
||||
<h2 id="camp-gallery" class="camp_title">Наши фотографии</h2>
|
||||
<?php
|
||||
$fotos = carbon_get_post_meta($post_id, 'fotos' );
|
||||
@ -547,7 +557,7 @@ $metrics = [
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section class="section-bg camp-reviews" data-bg="white">
|
||||
<section class="section-bg camp-reviews" data-bg="white" id="camp-reviews">
|
||||
<h2 id="camp-reviews" class="camp_title">Что говорят о нас родители</h2>
|
||||
<?php
|
||||
$review_items = carbon_get_post_meta($post_id, 'camp_reviews_list');
|
||||
@ -595,7 +605,7 @@ $metrics = [
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<section class="section-bg camp-faq" data-bg="mint">
|
||||
<section class="section-bg camp-faq" data-bg="mint" id="camp-faq">
|
||||
<h2 id="camp-faq" class="camp_title">Часто задаваемые вопросы</h2>
|
||||
<div class="faq-wrapper">
|
||||
|
||||
@ -639,7 +649,7 @@ $metrics = [
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section-bg camp-contact" data-bg="white">
|
||||
<section class="section-bg camp-contact" data-bg="white" id="camp-contacts">
|
||||
<?php
|
||||
$contact_tel = $opt_phone;
|
||||
$contact_address = $opt_address;
|
||||
@ -991,7 +1001,42 @@ if ( ! empty( $jsonld_social ) ) {
|
||||
if ( $agg_rating ) {
|
||||
$localbusiness['aggregateRating'] = $agg_rating;
|
||||
}
|
||||
$ld_graph = array_merge( array( $localbusiness, $organization ), $ld_events, $ld_faq );
|
||||
$ld_website = array(
|
||||
'@type' => 'WebSite',
|
||||
'@id' => home_url('/') . '#website',
|
||||
'url' => home_url('/'),
|
||||
'name' => $jsonld_name,
|
||||
'inLanguage' => 'ru-RU',
|
||||
'publisher' => array( '@id' => home_url('/') . '#organization' ),
|
||||
);
|
||||
$ld_webpage = array(
|
||||
'@type' => 'WebPage',
|
||||
'@id' => get_permalink( $post_id ),
|
||||
'url' => get_permalink( $post_id ),
|
||||
'inLanguage' => 'ru-RU',
|
||||
'name' => wp_get_document_title() ?: 'Городской лагерь в ' . $city_clean,
|
||||
'isPartOf' => array( '@id' => home_url('/') . '#website' ),
|
||||
'about' => array( '@id' => get_permalink( $post_id ) ),
|
||||
);
|
||||
$ld_breadcrumb = array(
|
||||
'@type' => 'BreadcrumbList',
|
||||
'@id' => get_permalink( $post_id ) . '#breadcrumb',
|
||||
'itemListElement' => array(
|
||||
array(
|
||||
'@type' => 'ListItem',
|
||||
'position' => 1,
|
||||
'name' => 'Главная',
|
||||
'item' => home_url( '/' ),
|
||||
),
|
||||
array(
|
||||
'@type' => 'ListItem',
|
||||
'position' => 2,
|
||||
'name' => 'Городской лагерь в ' . $city_clean,
|
||||
'item' => get_permalink( $post_id ),
|
||||
),
|
||||
),
|
||||
);
|
||||
$ld_graph = array_merge( array( $ld_website, $ld_webpage, $ld_breadcrumb, $localbusiness, $organization ), $ld_events, $ld_faq );
|
||||
|
||||
if ( ! empty( $ld_graph ) ) {
|
||||
$jsonld_data = array(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user