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
<html lang="ru-RU" itemscope="" itemtype="http://schema.org/WebSite" prefix="og: http://ogp.me/ns#"><!--<![endif]--><head><script src="http://web.archive.org/web/20161202145255js_/https://pagead2.googlesyndication.com/pub-config/r20160913/ca-pub-8922023647388553.js"></script><script async="" src="http://web.archive.org/web/20161202145255/https://www.google-analytics.com/analytics.js"></script><script src="http://web.archive.org/web/20161202145255js_/https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en_US.DCqkg4_f1cE.O/m=plusone/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AGLTcCN29Itx_77YsW7KCcAVebosjZAOGA/cb=gapi.loaded_0" async=""></script><script src="//archive.org/includes/analytics.js?v=cf34f82" type="text/javascript"></script> | |
<script type="text/javascript">window.addEventListener('DOMContentLoaded',function(){var v=archive_analytics.values;v.service='wb';v.server_name='wwwb-app58.us.archive.org';v.server_ms=454;archive_analytics.send_pageview({});});</script><script type="text/javascript" src="/_static/js/playba |
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
<p itemscope itemtype="http://schema.org/ImageObject"> | |
<img itemprop="contentUrl" srcset="1.jpg 1920w, 1-370.jpg 370w, 1-600.jpg 600w" sizes="(max-width: 991px) 370px, 600px" src="1.jpg" alt="Чашка "Победа""> | |
<meta itemprop="width" content="1920px"> | |
<meta itemprop="height" content="1440px"> | |
<meta itemprop="thumbnail" content="http://site.com/cup/1-600.jpg"> | |
<meta itemprop="thumbnail" content="http://site.com/cup/1-370.jpg"> | |
</p> |
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
<p itemscope itemtype="http://schema.org/ImageObject"> | |
<img itemprop="contentUrl" srcset="1.jpg 1920w, 1-370.jpg 370w, 1-600.jpg 600w" sizes="(max-width: 991px) 370px, 600px" src="1.jpg" alt="Чашка "Победа""> | |
<meta itemprop="width" content="1920px"> | |
<meta itemprop="height" content="1440px"> | |
<link sizes="600x600" href="http://site.com/cup/1-600.jpg" type="image/jpg"> | |
<link sizes="370x370" href="http://site.com/cup/1-370.jpg" type="image/jpg"> | |
</p> | |
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
add_filter( 'the_title', 'add_version_to_title', 10); | |
function add_version_to_title( $title ){ | |
$post = get_post(); | |
$title .= " моё какое-то слово" ; | |
return $title; | |
} | |
//И тут внезапно следующая функция дописывает в альт title вложенного изображения + то самое " моё какое-то слово" |
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
/* Делаем alt для Превью поста | |
* Функция автозаполнения alt должна быть отключена в плагинах типа | |
* Webcraftic Clearfy или любом другом, который устанавливает alt автоматически, так как там всегда генерирует на основе заголовка | |
* В некоторых темах, например OceanWP alt прописан как заголовок статьи в самой теме, и там нужно дополнительно кодить | |
* в Astra всё нормально работает | |
*/ | |
add_filter( 'wp_get_attachment_image_attributes', 'add_best_alt_attachment_image', 90, 2 ); | |
function add_best_alt_attachment_image( $attr, $attachment ) { | |
//проверяем не заполнен ли уже alt |
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
add_filter( 'wp_get_attachment_image_attributes', 'xxx_attachment_image', 90, 2 ); | |
function xxx_attachment_image( $attr, $attachment ) { | |
$custom_logo_id = get_theme_mod( 'custom_logo' ); | |
if($attachment->ID == $custom_logo_id) { | |
$attr['data-class'] = $custom_logo_id; | |
$attr['data-hey'] = 'hey'; |
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
//ВАРИАНТ №1 | |
//автозаполнение полей при вставке медиафайлов start | |
function wph_auto_alt_title_caption($attachment_ID) { | |
$filename = $_REQUEST['name']; | |
$withoutExt = preg_replace('/\\.[^.\\s]{3,4}$/', '', $filename); | |
$withoutExt = str_replace(array('-','_'), ' ', $withoutExt); | |
/* Автозаполнение подписи и описания - мне не пригодилось | |
$my_post = array( |
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
<html> | |
<body itemscope itemtype="https://schema.org/WebPage"> | |
<div id="header" itemprop="hasPart" itemscope itemtype="https://schema.org/WPHeader"> | |
<header> | |
<span itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization" itemid="/#org"> | |
<div itemprop="logo" itemscope="" itemtype="https://schema.org/ImageObject"> | |
<a href="https://" class="custom-logo-link" rel="home"><img width="150" height="75" src="/logo-250x125.png" class="attachment-150x75 size-150x75" alt="logo" loading="lazy" decoding="async" itemprop="url contentUrl" srcset="/logo-250x125.png 250w, /logo-300x150.png 300w, /logo-680x340.png 680w, /logo-768x384.png 768w, /logo-1536x768.png 1536w, /logo-2048x1024.png 2048w, /logo.png 2160w" sizes="(max-width: 150px) 100vw, 150px"></a> | |
</div> | |
<meta itemprop="name" content="Сайт"> |
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 | |
/* | |
Другие плагины для добавления <meta name="robots" content="noindex" />: | |
Этот плагин https://wordpress.org/plugins/noindex-seo/ | |
Easy Noindex And Nofollow https://wordpress.org/plugins/easy-noindex-and-nofollow/ | |
- noindex для Search Page, Category Page | |
Noindex Pages https://wordpress.org/plugins/noindex-pages/ |
OlderNewer