text Микроразметкадляпоисковиковпример
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Микроразметкадляпоисковиковпример相关的知识,希望对你有一定的参考价值。
//Полный пример
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"url": "https://microdata.pro/demo/",
"name": "Мой Магазин",
"email": "prut.n.v@gmail.com",
"logo": "https://microdata.pro/demo/image/catalog/logo.png",
"description": "Мой Магазин","address": {
"@type": "PostalAddress",
"addressLocality": "Москва, Россия",
"postalCode": "012345",
"streetAddress": "Пл. Победы 26Б"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.5",
"reviewCount": "2"
},
"potentialAction": {
"@type": "SearchAction",
"target": "https://microdata.pro/demo/index.php?route=product/search&search={search_term_string}",
"query-input": "required name=search_term_string"
},
"contactPoint" : [{
"@type" : "ContactPoint",
"telephone" : "+12-345-678-90-00",
"contactType" : "customer service"
},{
"@type" : "ContactPoint",
"telephone" : "+12-435-667-55-04",
"contactType" : "customer service"
}],
"sameAs" : ["https://vk.com/group","https://twitter.com/group"]
}
</script>
======================================================================================
Разметка хлебных крошек
======================================================================================
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://vesta-ceramics.ru/" itemprop="url"> <span itemprop="title">Главная</span></a> › </div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://vesta-ceramics.ru/keramicheskiy-granit/" itemprop="url">
<span itemprop="title">Керамический гранит</span></a> › </div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://vesta-ceramics.ru/keramicheskiy-granit/derevo/" itemprop="url">
<span itemprop="title">Дерево</span> </a></div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://vesta-ceramics.ru/keramicheskiy-granit/derevo/mezonin" itemprop="url">
<span itemprop="title">Мезонин</span> </a></div>
======================================================================================
Разметка которую выдал плагин для микроразметки
======================================================================================
Пост
-----------------
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://urosechenov.ru/zapis/"
},
"headline": "Запись",
"datePublished": "2017-11-20T18:08:50+0000",
"dateModified": "2017-11-20T18:08:50+0000",
"author": {
"@type": "Person",
"name": "admin"
},
"description": "",
"image": {
"@type": "ImageObject",
"url": "https://urosechenov.ru/wp-content/uploads/2018/04/logo_s.jpg",
"width": 92,
"height": 60 },
"publisher": {
"@type": "Organization",
"name": "Урологическая клиника им. Р.М. Фронштейна в Москве",
"logo": {
"@type": "ImageObject",
"url": "https://urosechenov.ru/wp-content/uploads/2018/04/logo_s.jpg",
"width": 92,
"height": 60
}
}
}
</script>
Общая инфа
-----------------
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"name": "Урологическая клиника им. Р.М. Фронштейна в Москве",
"url": "https://urosechenov.ru",
"logo": "https://urosechenov.ru/wp-content/uploads/2018/04/logo_s.jpg",
"contactPoint": [
{
"@type": "ContactPoint",
"telephone": "+79773011101",
"contactType": "customer service",
"email": "info@urologia.ru ",
"availableLanguage": [
"Russian"
]
}
],
"sameAs": [
"http://facebook.com",
"http://twitter.com",
"http://linkedin.com"
],
"address": {
"@type": "PostalAddress",
"streetAddress": "ул. Б. Пироговская д. 2, стр. 1",
"addressLocality": "Москва",
"postalCode": "119435",
"addressCountry": "Россия"
}
}
</script>
Картинка поста - должно быть обвернуто в div article
<?php if (has_post_thumbnail()) {
$thumb_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'thumbnail-size', true);
$images_size = wp_get_attachment_image_src(get_post_thumbnail_id());
$images = array($thumb_url[0], $images_size[1], $images_size[2]);
}?>
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject"><img itemprop="url" src="<?php echo $images[0];; ?>" width="<?php echo '"' . $images[1] . '"'; ?>" height="<?php echo '"' . $images[2] . '"'; ?>"/>
<meta itemprop="width" content="<?php echo '"' . $images[1] . '"'; ?>">
<meta itemprop="height" content="<?php echo '"' . $images[2] . '"'; ?>">
</div>
Дата - должно быть обвернуто в div article
<meta itemprop="dateModified" content="<?php echo get_the_modified_time( DATE_ISO8601, false, ID );?>" />
<meta itemprop="datePublished" content="<?php echo get_the_time( DATE_ISO8601, false, ID );?>" />
====================================================================================
Пример в футер
====================================================================================
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"name": "<?php echo bloginfo('description'); ?>",
"url": "<?php echo get_home_url(); ?>",
"logo": "https://vsdesign.com.ua/wp-content/uploads/2018/05/logo_m.png",
"contactPoint": [
{
"@type": "ContactPoint",
"telephone": "<?php echo get_field("phone", "option"); ?>",
"contactType": "customer service",
"email": "<?php echo get_field("email", "option"); ?>",
"availableLanguage": [
"Russian"
]
}
],
"sameAs": [
"https://www.facebook.com/ua.vsdesign/",
"https://www.instagram.com/ua.vsdesign/"
],
"address": {
"@type": "PostalAddress",
"streetAddress": "",
"addressLocality": "",
"postalCode": "",
"addressCountry": "Украина"
}
}
</script>
<?php if (is_single() || is_post()): ?>
<?php
if (is_single() && has_post_thumbnail()) {
$thumb_id = get_post_thumbnail_id();
$thumb_url = wp_get_attachment_image_src($thumb_id,'thumbnail-size', true);
$images_size = wp_get_attachment_image_src($thumb_id);
$images = array($thumb_url[0], $images_size[1], $images_size[2]);
}else{
$images = array('https://vsdesign.com.ua/wp-content/uploads/2018/05/logo_m.png', '183', '59');
}
?>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "<?php echo get_the_permalink(get_the_ID()); ?>"
},
"headline": "<?php echo get_the_title(); ?>",
"datePublished": "<?php echo get_the_time( DATE_ISO8601, false, ID );?>",
"dateModified": "<?php echo get_the_modified_time( DATE_ISO8601, false, ID );?>",
"author": {
"@type": "Person",
"name": "admin"
},
"description": "",
"image": {
"@type": "ImageObject",
"url": <?php echo '"' . $images[0] . '"'; ?>,
"width": <?php echo $images[1]; ?>,
"height": <?php echo $images[2]; ?>
},
"publisher": {
"@type": "Organization",
"name": "Урологическая клиника им. Р.М. Фронштейна в Москве",
"logo": {
"@type": "ImageObject",
"url": "https://urosechenov.ru/wp-content/uploads/2018/04/logo_s.jpg",
"width": 183,
"height": 59
}
}
}
</script>
<?php endif ?>
以上是关于text Микроразметкадляпоисковиковпример的主要内容,如果未能解决你的问题,请参考以下文章
text Примеркоманддляэкспортаиимпортабазыданных:
php Определяемисоздаемнабориликомплектутовара
css Когдатекстразбиваетсянаколонки,тобраузерпытаетсяравномернораспределитьсодержимоеблокапоуказанном
swift Затемяпопыталсявсе-такитупо,кодомвстиле“Пирамидапогибели”,получитьданныекартинкидля3-хподрядэл
php РегистрацияCPT,удалениеизссылокимяCPTипереадресацияприпопыткезапроситьCPTподефолтномуадресу。