This file contains 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 %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] |
This file contains 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
#в случае index.php: | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ | |
RewriteRule ^index\.php$ http://VASHSITE/ [R=301,L] | |
#в случае index.html: | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ | |
RewriteRule ^index\.html$ http://VASHSITE/ [R=301,L] |
This file contains 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
<ul class="breadcrumb container" itemscope itemtype="http://schema.org/BreadcrumbList"> | |
<?php foreach ($breadcrumbs as $i=> $breadcrumb) { ?> | |
<?php if($i==0) { ?><li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="<?php echo $breadcrumb['href']; ?>" itemprop="item"><span itemprop="name"> <?php echo $breadcrumb['text'];?></span></a><meta itemprop="position" content="<?php echo $i+1; ?>" ></li><?php } elseif($i+1<count($breadcrumbs)) { ?> | |
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="<?php echo $breadcrumb['href']; ?>" itemprop="item"><span itemprop="name"> | |
<?php echo $breadcrumb['text']; ?></span></a><meta itemprop="position" content="<?php echo $i+1; ?>" ></li><?php } else { ?><li><?php echo $breadcrumb['text']; ?></li><?php } ?> | |
<?php } ?> | |
</ul> |
This file contains 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
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "Product", | |
<?php if ($count_of_reviews > 0) { ?> | |
"aggregateRating": { | |
"@type": "AggregateRating", | |
"ratingValue": "<?php echo $rating; ?>", | |
"reviewCount": "<?php echo $count_of_reviews; ?>" | |
}, |
This file contains 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
User-agent: * | |
Disallow: / |
This file contains 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 if(ICL_LANGUAGE_CODE=='ru'): ?> | |
<!- Some text -> | |
<?php elseif(ICL_LANGUAGE_CODE=='ua'): ?> | |
<!- Some text -> | |
<?php elseif(ICL_LANGUAGE_CODE=='en'): ?> | |
<!- Some text -> | |
<?php endif; ?> |
This file contains 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 | |
/* | |
Template Name: Шаблон: | |
*/ | |
?> | |
<?php get_header(); ?> | |
<?php get_footer(); ?> |
This file contains 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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} domain1.ua | |
RewriteRule (.*) http://domain2.ua/$1 [R=301,L] |
This file contains 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
function remove_canonical() { | |
if ( is_singular( 'voprosy' ) || is_singular( 'filialy') || is_singular( 'uslugi' ) ){ | |
add_filter( 'wpseo_canonical', '__return_false', 10, 1 ); | |
} | |
} | |
add_action('wp', 'remove_canonical'); |
This file contains 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
//Change polylang code alternate | |
add_filter('pll_rel_hreflang_attributes', 'filter_pll_rel_hreflang_attributes', 10, 1); | |
function filter_pll_rel_hreflang_attributes($hreflangs) | |
{ | |
foreach ($hreflangs as $lang => $url) { | |
if ($lang == 'uk') { | |
$hreflangs['uk-UA'] = $hreflangs['uk']; |
OlderNewer