diff --git a/functions.php b/functions.php index 9893c8c..8e1aae6 100644 --- a/functions.php +++ b/functions.php @@ -722,7 +722,7 @@ add_action( 'pre_get_posts', function ($query) { } if (is_front_page()) { - $query->set( 'posts_per_page', 25 ); + $query->set( 'posts_per_page', 24 ); } @@ -762,15 +762,40 @@ add_filter( 'the_excerpt_rss', 'add_text_to_the_feed_end' ); -function add_div_youtube($content){ +function add_div_youtube($str){ + + $content = $str; - $content = str_replace( + $content = str_replace( [''], ['
'], $content); - return $content; + return $content; +return find_youtube($str); + + +} + +function find_youtube($str) { + + $result = $str; + + $pos1 = strpos($str, '', $pos1); + $iframe_len = $endpos - $pos1; + + $iframe = substr($str, $pos1, $iframe_len); + + $you_find = strpos($iframe, 'src="https://www.youtube.com/'); + + if ($you_find) { + $result = substr( $str, 0, $pos1 -1 ).'
'.$iframe.'
'.substr($str, $endpos+9); + } + + + return $result; } diff --git a/header.php b/header.php index 24c02ee..49c92f4 100644 --- a/header.php +++ b/header.php @@ -10,7 +10,7 @@ - + diff --git a/index.php b/index.php index 6aff48b..4a7d066 100644 --- a/index.php +++ b/index.php @@ -38,8 +38,8 @@ $nn = 0;?> - - + + diff --git a/single.php b/single.php index 4b76813..85b3a27 100644 --- a/single.php +++ b/single.php @@ -60,6 +60,10 @@ +
+ Какие новости интересны читателям «Ветеринарии и жизни»? Пройти опрос +
+

Свежие отраслевые новости на нашем канале в Telegram

Добавьте «Ветеринарию и жизнь» в избранное в ЯНДЕКС.НОВОСТИ

diff --git a/style.css b/style.css index ea2ee9f..790efd9 100644 --- a/style.css +++ b/style.css @@ -2340,8 +2340,9 @@ span.rub_back_title{ color: #2D9CDB; } - - +.promo-poll a{ + color: #2D9CDB; +} @media screen and ( max-width: 580px ) {