Files
profile/content-page-blog.php
Andrey Kuvshinov 8fc8cbae32 add files
2025-07-09 21:21:17 +03:00

116 lines
6.9 KiB
PHP

<?php
$post = get_post();
$category = get_the_category()[0];
$author = get_coauthors()[0];
$email = str_replace("-", ".", $author->user_nicename)."@news-profile.ru";
?>
<div class="js-ajax-data">
<div class="row clearfix">
<div class="col-12 col-xl-9 float-left">
<div class="author">
<div class="position-relative d-flex flex-column flex-md-row">
<div class="maroon">
<a class="sticker sticker--maroon" href="/blog">Блоги</a>
</div>
<div class="text-center text-md-left">
<img loading="lazy" class="author__img" src="<?= coauthors_get_avatar_url( $author, 166 ); ?>" width="166" height="166" alt="<?php echo the_title(); ?>" />
</div>
<div class="d-flex flex flex-column align-items-center align-items-md-start justify-content-between">
<div class="author__body d-flex flex flex-column align-items-center align-items-md-start justify-content-center">
<h3 class="author__title mt-3 mt-md-0 mb-2 mb-md-2">
<?php echo $author->display_name; ?>
</h3>
<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0">
<?php echo $author->description; ?>
</div>
</div>
</div>
</div>
</div>
<div class="onenews" itemscope itemtype="https://schema.org/NewsArticle">
<link itemprop="mainEntityOfPage" href="<?php echo get_permalink(); ?>"/>
<div class="d-none" itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<div class="d-none" itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<link itemprop="url" href="https://profile.ru/wp-content/themes/profile/assets/img/profil-logo.png"/>
</div>
<meta itemprop="name" content="<?php bloginfo(); ?>"/>
<link itemprop="url" href="<?php echo home_url(); ?>"/>
</div>
<div itemprop="articleSection" class="d-none"><?php the_category(); ?></div>
<meta itemprop="inLanguage" content="ru"/>
<meta itemprop="dateModified" content="<?php echo the_modified_date("c "); ?>"/>
<!--h1 itemprop="name headline" class="onenews__title"
data-url="<?php echo esc_url(get_permalink()); ?>">
<?php the_title(); ?>
</h1-->
<!--div class="publication__data">
<span class="publication__number" itemprop="datePublished"
content="<?php echo get_the_date("Y-m-d"); ?>">
<?php if (is_array(get_post_custom_values('num'))): ?>
<?php echo array_shift(get_post_custom_values('num')); ?>
<?php else: ?>
<?php echo get_the_date("d.m.Y") ?>
<?php if (get_post_type() == 'anew'): ?>
<?php echo get_the_time("H:i") ?>
<?php endif; ?>
<?php endif; ?>
</span>
<?php if (in_array(get_post_type(), array('anew', 'yellow'))): ?>
<?php get_template_part('author', 'news'); ?>
<?php else: ?>
<?php get_template_part('author', 'single'); ?>
<?php endif; ?>
</div-->
<div class="onenews__body">
<div class="stick js-stickybit d-none d-lg-block">
<!--div class="ya-share2" data-services="facebook,vkontakte,twitter,telegram,odnoklassniki"></div-->
<?php echo share_block(get_the_ID()); ?>
</div>
<?php if (has_post_thumbnail() && show_thumbnail()): ?>
<!--figure itemprop="image" itemscope itemtype="https://schema.org/ImageObject" id="attachment_<?php echo get_post_thumbnail_id(); ?>">
<link itemprop="url" href="<?php echo get_the_post_thumbnail_url(get_queried_object_id(), 'large'); ?>" />
<link itemprop="contentUrl" href="<?php echo get_the_post_thumbnail_url(get_queried_object_id(), 'large'); ?>" />
<?php echo get_the_post_thumbnail($post, array(782, 440)); ?>
<?php $thumb = get_post(get_post_thumbnail_id()); ?>
<figcaption itemprop="description">
<?php if (strlen($thumb->post_content) !== 0): ?>
<p><?php echo $thumb->post_content; ?></p>
<?php endif; ?>
<?php if (strlen($thumb->post_excerpt) !== 0 && !strposa($thumb->post_excerpt, ['instag', 'faceb', 'инстаг'])): ?>
<span>©<?php echo str_replace(array("Фото: ", "Фото:"), "", main_photo_caption($thumb->post_excerpt)); ?></span>
<?php endif; ?>
</figcaption>
</figure-->
<?php endif; ?>
<div class="micromarking" itemprop="articleBody"
data-post-type="<?php echo get_post_type(); ?>">
<?php
global $more;
$more = 1;
echo the_content();
?>
</div>
<div class="stick js-stickybit d-xs-none d-lg-none">
<?php echo share_block(get_the_ID()); ?>
</div>
</div>
</div>
<?php get_template_part('content', 'post_tags'); ?>
<?php get_template_part('content', 'popular-blog'); ?>
</div>
<div class="col-12 col-xl-3 float-left d-none d-xl-block">
<div class="right-side">
<?php dynamic_sidebar('right_sidebar'); ?>
<div class="js-stickybit">
<?php get_template_part('content', 'ad'); ?>
</div>
</div>
</div>
</div>
</div>