Files
profile/template-parts/home/colon-item.php

89 lines
2.3 KiB
PHP
Raw Normal View History

2025-07-09 21:21:17 +03:00
<!--[home/colon-item]-->
<?php
global $main_item, $colon_item;
$colon_query = new WP_Query(
[
"post_type" => ["anew", "profile_article"],
"post_status" => "publish",
"meta_query" => [
"relation" => "AND",
[
"key" => "colon_item",
"value" => "true",
"compare" => "LIKE"
]
],
"posts_per_page" => 1,
"suppress_filters" => true,
"ignore_sticky_posts" => true,
"order" => "DESC",
"orderby" => "post_date"
]
);
?>
<?php if($colon_query->have_posts()): ?>
<?php while ($colon_query->have_posts()): ?>
<?php $colon_query->the_post(); ?>
<?php $colon_item = get_the_ID(); ?>
<div class="d-flex" >
2025-08-27 00:00:02 +03:00
<div class="blog">
2025-07-09 21:21:17 +03:00
<a class="blog__frame" href="<?= the_permalink() ?>">
<img loading="lazy"
itemprop="image"
class="d-block"
src="<?= the_post_thumbnail_url( [ 264, 264 ] ); ?>"
width="167"
height="158"
alt="<?= htmlspecialchars( get_the_title() ) ?>"
/>
</a>
<div class="blog__body">
<a class="blog__title" href="<?= the_permalink() ?>">
<?php if( function_exists('get_secondary_title') && get_secondary_title() ) : ?>
<?= the_secondary_title() ?>
<?php else: ?>
<?= the_title() ?>
<?php endif; ?>
</a>
2025-08-27 00:00:02 +03:00
<?php //get_template_part("template-parts/micro/post"); ?>
2025-07-09 21:21:17 +03:00
<div class="blog__detail">
<?php get_template_part("template-parts/post/blog-date"); ?>
2025-08-27 00:00:02 +03:00
<?php get_template_part("template-parts/post/colon-author"); ?>
2025-07-09 21:21:17 +03:00
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<!--[/home/colon-item]-->