This file contains hidden or 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
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^(.*)$ https://zaurmag.ru/$1 [R=301,L] |
This file contains hidden or 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
<?php | |
/*** Функция хлебных крошек ***/ | |
function breadcrumbs_new() { | |
$mayak_home = 'Главная'; // текст ссылки "Главная" | |
$mayak_last_crumb = 1; // 1 - показывать название текущей статьи/страницы/рубрики, 0 - не показывать | |
$mayak_between = ' <span class="crumb_separator">»</span> '; | |
$mayak_from = '<span class="current-crumbs">'; | |
$mayak_to = '</span>'; | |
global $post; | |
$mayak_link_to_home = home_url('/'); |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Простая форма связи на ajax</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script> | |
// ======= Ajax Submit Form Plugin ======= | |
(function($) { |
This file contains hidden or 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
/** ===== Humburger ===== **/ | |
.hamburger { | |
display: block; | |
text-decoration: none; | |
position: relative; | |
outline: none; | |
transition: transform .3s ease; | |
height: 20px; | |
width: 30px; | |
z-index: 10; |
This file contains hidden or 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
<?php | |
//отрисовка рекламы в статьях | |
function addContent($addTo, $add, $cntRep, $after = '</p>', $openTag = '<div align="center">', $closeTag = '</div>'){ | |
$posAfter = 0; | |
for ($i=0; $i < $cntRep; $i++) { | |
$pos = stripos($addTo, $after, $posAfter); | |
$posAfter = $pos+strlen($after); | |
if($pos===FALSE){ | |
return $addTo; | |
} |
This file contains hidden or 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
<?php | |
// GET CUSTOM FIELDS | |
$myCustomFields = array(); | |
foreach($this->item->jcfields as $field) { | |
$myCustomFields[$field->name] = $field->value; | |
} | |
// RECOVER CUSTOM FILED NAME | |
if (isset($myCustomFields['url']) and !empty($myCustomFields['url'])) : ?> | |
<div class="field"> | |
<?php echo $myCustomFields['url']; ?> |
This file contains hidden or 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
<?php | |
$text = $this->item->text; | |
$patern="#<[\s]*p[\s]*>([^<]*)<[\s]*/p[\s]*>#i"; | |
if(preg_match($patern, $text, $matches)) echo "<p>".$matches[1]."</p>"; | |
?> |
This file contains hidden or 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
/** ------------------------------------------------------------ | |
==================== RESPONSIVE ======================== | |
------------------------------------------------------------------------------ **/ | |
/** ----------------------------------------- | |
========= MIN-WIDTH ========== | |
-------------------------------------------- **/ | |
@media (min-width: 1201px) {} | |
@media (min-width: 992px) {} |
This file contains hidden or 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
// ================ Wrap img in content HTML5 tags ================ | |
var imgContent = $('.page__body.textblock a.popup-video img'); | |
imgContent.each(function() { | |
$this = $(this); | |
var imgTitle = $this.attr('title'); | |
if (imgTitle) { | |
$this.parent('.popup-video').wrap('<figure class="content-image"></figure>'); | |
$this.parent('.popup-video').append('<figcaption class="content-image__title">' + imgTitle + '</figcaption>'); | |
} | |
}); |
This file contains hidden or 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
<?php | |
$args = array( | |
'posts_per_page' => 15, | |
'cat' => 12 | |
); | |
$postsArr = get_posts( $args ); | |
$chunkPosts = array_chunk($postsArr ,9); | |
foreach($chunkPosts as $posts){ | |
echo '<div class="klients-logos__item">'; |