add files
This commit is contained in:
20
template-parts/micro/author.php
Normal file
20
template-parts/micro/author.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<!--[micro/author]-->
|
||||
|
||||
<?php
|
||||
|
||||
$authors = get_coauthors();
|
||||
|
||||
?>
|
||||
|
||||
<?php foreach ( $authors as $author ): ?>
|
||||
|
||||
<span class="d-none" itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
|
||||
<meta itemprop="name" content="<?= htmlspecialchars($author->display_name); ?>" />
|
||||
<link itemprop="url" href="<?= get_author_posts_url( $author->ID, $author->user_nicename ); ?>" />
|
||||
|
||||
</span>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!--[/micro/author]-->
|
||||
9
template-parts/micro/image.php
Normal file
9
template-parts/micro/image.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<!--[micro/image]-->
|
||||
|
||||
<?php if( has_post_thumbnail() ): ?>
|
||||
|
||||
<img itemprop="image" src="<?= the_post_thumbnail_url("large"); ?>" class="d-none" loading="lazy" />
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/micro/image]-->
|
||||
17
template-parts/micro/post.php
Normal file
17
template-parts/micro/post.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<!--[micro/post]-->
|
||||
|
||||
<link itemprop="mainEntityOfPage" href="<?= get_permalink(); ?>"/>
|
||||
|
||||
<meta itemprop="inLanguage" content="ru"/>
|
||||
|
||||
<meta itemprop="headline name" content="<?= htmlspecialchars( get_the_title() ) ?>" />
|
||||
|
||||
<meta itemprop="dateModified" content="<?= the_modified_date("c"); ?>"/>
|
||||
|
||||
<?php
|
||||
|
||||
get_template_part("template-parts/micro/terms");
|
||||
|
||||
?>
|
||||
|
||||
<!--[/micro/post]-->
|
||||
31
template-parts/micro/publisher.php
Normal file
31
template-parts/micro/publisher.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<!--[micro/publisher]-->
|
||||
|
||||
<div class="d-none" itemprop="publisher" itemscope itemtype="https://schema.org/NewsMediaOrganization">
|
||||
|
||||
<link itemprop="logo" href="<?= get_template_directory_uri() ?>/assets/img/profil-logo.png" />
|
||||
|
||||
<link itemprop="image" href="<?= get_template_directory_uri() ?>/assets/img/profil-logo.png" />
|
||||
|
||||
<meta itemprop="name" content="Информационное агентство Деловой журнал «Профиль»" />
|
||||
|
||||
<meta itemprop="email" content="profile@profile.ru" />
|
||||
|
||||
<span class="d-none" itemprop="telephone"> +7 (495) 671-01-10 </span>
|
||||
|
||||
<span class="d-none" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
|
||||
|
||||
<span class="d-none" itemprop="streetAddress">Б. Андроньевская, д. 17</span>
|
||||
|
||||
<span class="d-none" itemprop="postalCode">109544</span>
|
||||
|
||||
<span class="d-none" itemprop="addressLocality">Москва, Российская Федерация</span>
|
||||
|
||||
</span>
|
||||
|
||||
<meta itemprop="foundingDate" content="1996-04-17" />
|
||||
|
||||
<link itemprop="url" content="<?= home_url(); ?>" />
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/micro/publisher]-->
|
||||
17
template-parts/micro/terms.php
Normal file
17
template-parts/micro/terms.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<!--[micro/terms]-->
|
||||
|
||||
<div class="d-none">
|
||||
|
||||
<?php foreach (wp_get_post_terms( get_the_ID(), ["category", "post_tag"] ) as $term) : ?>
|
||||
|
||||
<span itemprop="articleSection">
|
||||
|
||||
<?= $term->name ?>
|
||||
|
||||
</span>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/micro/terms]-->
|
||||
Reference in New Issue
Block a user