add files
This commit is contained in:
22
template-parts/archive/ajax-load-more.php
Normal file
22
template-parts/archive/ajax-load-more.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<!--[archive/ajax-load-more]-->
|
||||
|
||||
<?php if( is_post_type_archive() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/ajax-load-more/post-type" ) ?>
|
||||
|
||||
<?php elseif( is_tag() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/ajax-load-more/tag" ) ?>
|
||||
|
||||
<?php elseif( is_author() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/ajax-load-more/author" ) ?>
|
||||
|
||||
<?php elseif( is_category() && !is_events() ): ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/ajax-load-more/category" ) ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!--[/archive/ajax-load-more]-->
|
||||
57
template-parts/archive/ajax-load-more/author.php
Normal file
57
template-parts/archive/ajax-load-more/author.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<!--[archive/ajax-load-more/author]-->
|
||||
|
||||
<?php
|
||||
|
||||
$author = get_coauthors()[0];
|
||||
|
||||
$terms = [
|
||||
get_term_by( 'slug', 'cap-' . $author->user_nicename, "author" )->slug,
|
||||
get_term_by( 'slug', 'cap-' . $author->linked_account, "author" )->slug
|
||||
];
|
||||
|
||||
$terms = array_filter($terms);
|
||||
|
||||
$taxonomy = implode (
|
||||
":",
|
||||
array_map(
|
||||
fn ($node) => "author",
|
||||
$terms
|
||||
)
|
||||
);
|
||||
|
||||
$operator = implode (
|
||||
":",
|
||||
array_map(
|
||||
fn ($node) => "IN",
|
||||
$terms
|
||||
)
|
||||
);
|
||||
|
||||
$terms = implode(
|
||||
":",
|
||||
$terms
|
||||
);
|
||||
|
||||
$index_alm_shortcode = '
|
||||
[ajax_load_more
|
||||
cache="true"
|
||||
cache_id="' . get_alm_cache_id() . date("U") . '"
|
||||
container_type="div"
|
||||
css_classes="row"
|
||||
post_type="profile_article,anew,yellow"
|
||||
repeater="template_23"
|
||||
posts_per_page="10"
|
||||
post_format="standard"
|
||||
offset="8"
|
||||
id="archive"
|
||||
taxonomy="' . $taxonomy . '"
|
||||
taxonomy_terms="' . $terms . '"
|
||||
taxonomy_operator="' . $operator . '"
|
||||
taxonomy_relation="OR"
|
||||
]';
|
||||
|
||||
echo do_shortcode( $index_alm_shortcode );
|
||||
|
||||
?>
|
||||
|
||||
<!--[/archive/ajax-load-more/author]-->
|
||||
24
template-parts/archive/ajax-load-more/category.php
Normal file
24
template-parts/archive/ajax-load-more/category.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<!--[archive/ajax-load-more/category]-->
|
||||
|
||||
<?php
|
||||
|
||||
$index_alm_shortcode = '
|
||||
[ajax_load_more
|
||||
cache="true"
|
||||
cache_id="' . get_alm_cache_id( get_queried_object()->term_id ) . '"
|
||||
container_type="div"
|
||||
css_classes="row"
|
||||
post_type="profile_article,anew,yellow"
|
||||
repeater="template_23"
|
||||
posts_per_page="10"
|
||||
post_format="standard"
|
||||
offset="8"
|
||||
id="archive"
|
||||
category="' . get_queried_object()->slug . '"
|
||||
]';
|
||||
|
||||
echo do_shortcode( $index_alm_shortcode );
|
||||
|
||||
?>
|
||||
|
||||
<!--[/archive/ajax-load-more/category]-->
|
||||
3
template-parts/archive/ajax-load-more/event.php
Normal file
3
template-parts/archive/ajax-load-more/event.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<!--[archive/ajax-load-more/event]-->
|
||||
<!--TODO:это потом-->
|
||||
<!--[/archive/ajax-load-more/event]-->
|
||||
23
template-parts/archive/ajax-load-more/post-type-grid.php
Normal file
23
template-parts/archive/ajax-load-more/post-type-grid.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<!--[archive/ajax-load-more/post-type-grid]-->
|
||||
|
||||
<?php
|
||||
|
||||
$index_alm_shortcode = '
|
||||
[ajax_load_more
|
||||
cache="true"
|
||||
cache_id="' . get_alm_cache_id( 23 ) . '"
|
||||
container_type="div"
|
||||
css_classes="row"
|
||||
post_type="profile_article"
|
||||
repeater="template_23"
|
||||
posts_per_page="10"
|
||||
post_format="standard"
|
||||
offset="8"
|
||||
id="archive"
|
||||
]';
|
||||
|
||||
echo do_shortcode( $index_alm_shortcode );
|
||||
|
||||
?>
|
||||
|
||||
<!--[/archive/ajax-load-more/post-type-grid]-->
|
||||
22
template-parts/archive/ajax-load-more/post-type-list.php
Normal file
22
template-parts/archive/ajax-load-more/post-type-list.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<!--[archive/ajax-load-more/post-type-list]-->
|
||||
|
||||
<?php
|
||||
|
||||
$index_alm_shortcode = '
|
||||
[ajax_load_more
|
||||
cache="true"
|
||||
cache_id="' . get_alm_cache_id( 24 ) . '"
|
||||
container_type="div"
|
||||
post_type="anew,yellow"
|
||||
repeater="template_24"
|
||||
posts_per_page="10"
|
||||
post_format="standard"
|
||||
offset="8"
|
||||
id="archive"
|
||||
]';
|
||||
|
||||
echo do_shortcode( $index_alm_shortcode );
|
||||
|
||||
?>
|
||||
|
||||
<!--[/archive/ajax-load-more/post-type-list]-->
|
||||
13
template-parts/archive/ajax-load-more/post-type.php
Normal file
13
template-parts/archive/ajax-load-more/post-type.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<!--[archive/ajax-load-more/post-type]-->
|
||||
|
||||
<?php if( get_post_type() === "profile_article" ) : ?>
|
||||
|
||||
<?php get_template_part("template-parts/archive/ajax-load-more/post-type-grid") ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php get_template_part("template-parts/archive/ajax-load-more/post-type-list") ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/ajax-load-more/post-type]-->
|
||||
24
template-parts/archive/ajax-load-more/tag.php
Normal file
24
template-parts/archive/ajax-load-more/tag.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<!--[archive/ajax-load-more/tag]-->
|
||||
|
||||
<?php
|
||||
|
||||
$index_alm_shortcode = '
|
||||
[ajax_load_more
|
||||
cache="true"
|
||||
cache_id="' . get_alm_cache_id() . '"
|
||||
container_type="div"
|
||||
css_classes="row"
|
||||
post_type="profile_article,anew,yellow"
|
||||
repeater="template_23"
|
||||
posts_per_page="10"
|
||||
post_format="standard"
|
||||
offset="8"
|
||||
id="archive"
|
||||
tag="' . get_queried_object()->slug . '"
|
||||
]';
|
||||
|
||||
echo do_shortcode( $index_alm_shortcode );
|
||||
|
||||
?>
|
||||
|
||||
<!--[/archive/ajax-load-more/tag]-->
|
||||
19
template-parts/archive/cell-image.php
Normal file
19
template-parts/archive/cell-image.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<!--[archive/cell-image]-->
|
||||
|
||||
<?php if( has_post_thumbnail() ) : ?>
|
||||
|
||||
<img loading="lazy"
|
||||
src="<?= the_post_thumbnail_url($args["wide"] && !wp_is_mobile() ? "large" : "post-thumbnail"); ?>"
|
||||
alt="<?= htmlspecialchars( get_the_title() ) ?>"
|
||||
/>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<img loading="lazy"
|
||||
src="<?= wp_get_attachment_image_url( 1357368, $args["wide"] && !wp_is_mobile() ? "large" : "post-thumbnail"); ?>"
|
||||
alt="<?= htmlspecialchars( get_the_title() ) ?>"
|
||||
/>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[archive/cell-image]-->
|
||||
45
template-parts/archive/cell.php
Normal file
45
template-parts/archive/cell.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!--[archive/cell(wide => <?= $args["wide"] ?>)]-->
|
||||
|
||||
<?php global $wp_query; ?>
|
||||
|
||||
<div class="col-12 col-md-4 col-xl-<?= $args["wide"] ? 8 : 4 ?> float-left">
|
||||
|
||||
<?php //get_template_part("template-parts/micro/post"); ?>
|
||||
|
||||
<div class="article cell">
|
||||
|
||||
<a class="article__frame <?= $args["wide"] ? "article__frame--wide" : "" ?>" href="<?= the_permalink() ?>">
|
||||
|
||||
<?php get_template_part("template-parts/archive/cell-image"); ?>
|
||||
|
||||
</a>
|
||||
|
||||
<?php get_template_part("template-parts/post/cell-sticker"); ?>
|
||||
|
||||
<div class="article__body">
|
||||
|
||||
<?php get_template_part("template-parts/post/cell-date"); ?>
|
||||
|
||||
<h2>
|
||||
|
||||
<a class="article__title" href="<?= the_permalink() ?>">
|
||||
|
||||
<?= the_title() ?>
|
||||
|
||||
</a>
|
||||
|
||||
</h2>
|
||||
|
||||
<div class="article__detail">
|
||||
|
||||
<?php get_template_part("template-parts/post/cell-author"); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/archive/cell(wide => <?= $args["wide"] ?>)]-->
|
||||
50
template-parts/archive/event-cell.php
Normal file
50
template-parts/archive/event-cell.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<!--[archive/event-cell(wide => <?= $args["wide"] ?>)]-->
|
||||
|
||||
<div class="col-12 col-md-4 col-xl-<?= $args["wide"] ? 8 : 4 ?> float-left"
|
||||
itemscope
|
||||
<?php if( get_post_type() == "profile_article"): ?>
|
||||
itemtype="https://schema.org/Article"
|
||||
<?php else: ?>
|
||||
itemtype="https://schema.org/NewsArticle"
|
||||
<?php endif; ?>
|
||||
>
|
||||
|
||||
<?php get_template_part("template-parts/micro/post"); ?>
|
||||
|
||||
<div class="article cell">
|
||||
|
||||
<a class="article__frame <?= $args["wide"] ? "article__frame--wide" : "" ?>" href="<?= the_permalink() ?>">
|
||||
|
||||
<img loading="lazy"
|
||||
itemprop="image"
|
||||
src="<?= the_post_thumbnail_url($args["wide"] && !wp_is_mobile() ? "large" : "post-thumbnail"); ?>"
|
||||
alt="<?= htmlspecialchars( get_the_title() ) ?>"
|
||||
/>
|
||||
|
||||
</a>
|
||||
|
||||
<?php get_template_part("template-parts/post/cell-sticker"); ?>
|
||||
|
||||
<div class="article__body">
|
||||
|
||||
<?php get_template_part("template-parts/post/event-cell-date"); ?>
|
||||
|
||||
<a class="article__title" href="<?= the_permalink() ?>">
|
||||
|
||||
<?= the_title() ?>
|
||||
|
||||
</a>
|
||||
|
||||
<div class="article__detail">
|
||||
|
||||
<?php get_template_part("template-parts/post/cell-author"); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[archive/event-cell(wide => <?= $args["wide"] ?>)]-->
|
||||
47
template-parts/archive/grid.php
Normal file
47
template-parts/archive/grid.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<!--[archive/grid]-->
|
||||
|
||||
<div class="row clearfix d-block">
|
||||
|
||||
<?php global $wp_query; ?>
|
||||
|
||||
<!--
|
||||
|
||||
<?= $wp_query->request ?>
|
||||
|
||||
-->
|
||||
|
||||
<?php if( have_posts() ) : ?>
|
||||
|
||||
<?php while( have_posts() ) : ?>
|
||||
|
||||
<?php the_post(); ?>
|
||||
|
||||
<?php if( is_events() ) : ?>
|
||||
|
||||
<?php get_template_part("template-parts/archive/event-cell", "", ["wide" => in_array( $wp_query->current_post, [ 4, 8, 14 ] ) ]); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php get_template_part("template-parts/archive/cell", "", ["wide" => in_array( $wp_query->current_post, [ 4, 8, 14 ] ) ]); ?>
|
||||
|
||||
<?php if ( wp_is_mobile() && $wp_query->current_post%3 === 0 ) : ?>
|
||||
|
||||
<?php get_template_part("template-parts/ad/adfox/ad-inlist-1"); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php get_template_part("template-parts/no-posts"); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/archive/grid]-->
|
||||
33
template-parts/archive/header.php
Normal file
33
template-parts/archive/header.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--[archive/header]-->
|
||||
|
||||
<?php if( is_events() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/header/event" ) ?>
|
||||
|
||||
<?php elseif( is_branding() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/header/special/branding" ) ?>
|
||||
|
||||
<?php elseif( (is_special()) ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/header/special/", get_special_slug() ) ?>
|
||||
|
||||
<?php elseif( is_post_type_archive() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/header/post-type" ) ?>
|
||||
|
||||
<?php elseif( is_tag() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/header/tag" ) ?>
|
||||
|
||||
<?php elseif( is_author() ) : ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/header/author" ) ?>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<?php get_template_part( "template-parts/archive/header/category" ) ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/header]-->
|
||||
83
template-parts/archive/header/author.php
Normal file
83
template-parts/archive/header/author.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<!--[archive/header/author]-->
|
||||
|
||||
<?php
|
||||
|
||||
$email = str_replace("-", ".", get_post_meta(get_queried_object_id(), 'cap-user_login', true))."@news-profile.ru";
|
||||
|
||||
?>
|
||||
|
||||
<?php if( get_post_meta( get_queried_object_id() , 'show_data', true) == 1 ) : ?>
|
||||
|
||||
<div class="author position-relative">
|
||||
|
||||
<div class="position-relative d-flex flex-column flex-md-row" itemscope="" itemtype="https://schema.org/Person">
|
||||
|
||||
<div class="text-center text-md-left">
|
||||
|
||||
<?= get_the_post_thumbnail( get_queried_object() ) ?>
|
||||
|
||||
</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">
|
||||
|
||||
<h1 class="author__title mt-3 mt-md-0 mb-2 mb-md-2" itemprop="name" lang="ru">
|
||||
|
||||
<?= get_queried_object()->display_name ?>
|
||||
|
||||
</h1>
|
||||
|
||||
<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0">
|
||||
|
||||
<a href="mailto:<?= $email ?>" itemprop="email">
|
||||
|
||||
<?= $email ?>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0" itemprop="description">
|
||||
|
||||
<div style="margin-top: 8px;"><?= wpautop( get_queried_object()->description ); ?></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="author__post text-center text-md-left py-1 py-md-0 mb-4 mb-md-0" itemprop="url">
|
||||
<?php echo get_profile_website_link( get_queried_object()->website );?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
|
||||
<div class="position-relative d-flex flex-column flex-md-row mb-4" itemscope itemtype="https://schema.org/Person">
|
||||
|
||||
<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">
|
||||
|
||||
<h1 class="author__title mt-3 mt-md-0 mb-2 mb-md-2" itemprop="name" lang="ru">
|
||||
|
||||
<?= get_queried_object()->display_name ?>
|
||||
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/header/author]-->
|
||||
44
template-parts/archive/header/category.php
Normal file
44
template-parts/archive/header/category.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<!--[archive/header/category]-->
|
||||
|
||||
<?php if( !is_in_dk() ) : ?>
|
||||
|
||||
<div class="mb-4 position-relative">
|
||||
|
||||
<?php get_template_part("template-parts/ad/revive/ad", "", [ "zone" => 12 ]) ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if( wp_is_mobile() ) : ?>
|
||||
|
||||
<?php
|
||||
|
||||
$term_id = get_current_page_main_taxonomy_term_id( );
|
||||
|
||||
$color = get_term_meta( $term_id, "color", true );
|
||||
|
||||
$color = $color ? $color : "grey";
|
||||
|
||||
?>
|
||||
|
||||
<div class="col-12 col-md-6 col-xl-4 float-left">
|
||||
|
||||
<div class="section__title section__title--<?= $color ?> d-block d-md-none mb-3">
|
||||
|
||||
<?= get_term( get_queried_object_id() )->name ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php else : ?>
|
||||
|
||||
<div class="col-12 col-md-6 col-xl-4 float-left">
|
||||
|
||||
<?= str_replace("<p></p>", "", term_description( get_queried_object()->term_id )); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/header/category]-->
|
||||
13
template-parts/archive/header/event.php
Normal file
13
template-parts/archive/header/event.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<!--[archive/header/event]-->
|
||||
|
||||
<div class="d-flex justify-content-start align-items-center mb-3">
|
||||
|
||||
<h1 class="fs-32 font-weight-bold">
|
||||
|
||||
Календарь событий
|
||||
|
||||
</h1>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/archive/header/event]-->
|
||||
17
template-parts/archive/header/post-type.php
Normal file
17
template-parts/archive/header/post-type.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<!--[archive/header/post-type]-->
|
||||
|
||||
<?php if ( wp_is_mobile() || 1==1 ) : ?>
|
||||
|
||||
<div class="col-12 d-block d-md-none mb-3">
|
||||
|
||||
<div class="section__title section__title--orange">
|
||||
|
||||
<?= get_queried_object()->label ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/header/post-type]-->
|
||||
9
template-parts/archive/header/special/branding.php
Normal file
9
template-parts/archive/header/special/branding.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<!--[archive/header/special/branding]-->
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
<?= str_replace("<p></p>", "", term_description( get_queried_object()->term_id )); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/archive/header/special/branding]-->
|
||||
@@ -0,0 +1,3 @@
|
||||
<!--[archive/header/special/special-mamleev]-->
|
||||
<!--TODO:Проверить, надо ли и сделать, если надо-->
|
||||
<!--[/archive/header/special/special-mamleev]-->
|
||||
92
template-parts/archive/header/tag.php
Normal file
92
template-parts/archive/header/tag.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<!--[archive/header/tag]-->
|
||||
|
||||
<?php
|
||||
|
||||
$thumbnail_id = get_term_meta( get_queried_object_id(), "term_thumbnail", true );
|
||||
$term_description = term_description( get_queried_object_id() );
|
||||
|
||||
$rkn_meta = get_term_meta( get_queried_object_id(), "rkn_disclaimer", true );
|
||||
|
||||
?>
|
||||
<?php if( $thumbnail_id ): ?>
|
||||
|
||||
<div class="tag">
|
||||
|
||||
<div class="tag__body position-relative">
|
||||
|
||||
<?= wp_get_attachment_image_html($thumbnail_id, false, false, 1200); ?>
|
||||
|
||||
<div class="tag-main">
|
||||
|
||||
<h1 class="tag__body__title">
|
||||
|
||||
<img loading="lazy" src="/wp-content/themes/profile/assets/img/news/item/subtract.svg" alt="">
|
||||
|
||||
<?= get_term( get_queried_object_id() )->name ?>
|
||||
|
||||
</h1>
|
||||
|
||||
<?php if ( $term_description ) : ?>
|
||||
|
||||
<div class="tag__body__text d-none d-md-block">
|
||||
|
||||
<?= $term_description; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( $term_description ) : ?>
|
||||
|
||||
<div class="container-fluid tag-mobile__text tag__body__text d-md-none">
|
||||
|
||||
<?= $term_description; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="profile_onenews mb-4">
|
||||
|
||||
<div class="profile_onenews__title h2">
|
||||
|
||||
<svg class="align-baseline svg-icon" width="36" height="37"><use xlink:href="/wp-content/themes/profile/assets/img/sprites-svg/dist/sprite.svg#tag"></use></svg>
|
||||
|
||||
<?= get_term( get_queried_object_id() )->name ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ( $term_description ) : ?>
|
||||
|
||||
<div class="newstag__body__text d-none d-md-block">
|
||||
|
||||
<?= $term_description; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($rkn_meta): ?>
|
||||
|
||||
<div class="mt-2 mb-4 col-12">
|
||||
<em>
|
||||
<?= get_rkn_disclaimer_for_tags($rkn_meta, get_term( get_queried_object_id() )->name); ?>
|
||||
</em>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<!--[/archive/header/tag]-->
|
||||
59
template-parts/archive/list-item.php
Normal file
59
template-parts/archive/list-item.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<!--[archive/list-item]-->
|
||||
|
||||
<?php global $wp_query; ?>
|
||||
|
||||
<div class="newslist__item">
|
||||
|
||||
<?php //get_template_part("template-parts/micro/post"); ?>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<?php if ( has_post_thumbnail() && show_post_thumbnail() ) : ?>
|
||||
|
||||
<a class="newslist__frame" href="<?= the_permalink() ?>">
|
||||
|
||||
<img loading="lazy"
|
||||
src="<?= the_post_thumbnail_url("thumb-320"); ?>"
|
||||
alt="<?= htmlspecialchars( get_the_title() ) ?>"
|
||||
width="224"
|
||||
height="138" />
|
||||
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="newslist__body">
|
||||
<h2 class="newslist__title" style="font-weight:700">
|
||||
|
||||
<a href="<?= the_permalink() ?>">
|
||||
|
||||
<?= the_title() ?>
|
||||
|
||||
</a>
|
||||
|
||||
</h2>
|
||||
<a href="<?= the_permalink() ?>" class="d-none d-md-block mb-4">
|
||||
|
||||
<?= get_first_paragraph() ?>
|
||||
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="publication__data">
|
||||
|
||||
<?php get_template_part("template-parts/post/list-item-date") ?>
|
||||
|
||||
<?php get_template_part("template-parts/post/list-item-author") ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[/archive/list-item]-->
|
||||
54
template-parts/archive/list.php
Normal file
54
template-parts/archive/list.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<!--[archive/list]-->
|
||||
|
||||
<?php global $wp_query; ?>
|
||||
|
||||
<?php if( have_posts() ) : ?>
|
||||
|
||||
<?php
|
||||
|
||||
$counter = 0;
|
||||
|
||||
while( have_posts() ) :
|
||||
|
||||
$counter++;
|
||||
|
||||
?>
|
||||
|
||||
<?php the_post(); ?>
|
||||
|
||||
<?php get_template_part("template-parts/archive/list-item", "", ["counter" => $counter]); ?>
|
||||
|
||||
<?php if ( wp_is_mobile() && $wp_query->current_post%3 ) : ?>
|
||||
|
||||
<div class="newslist__item clearfix">
|
||||
|
||||
<?php get_template_part("template-parts/ad/adfox/ad-inlist-2"); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
<div class="pagination">
|
||||
<?php
|
||||
echo paginate_links(array(
|
||||
'base' => str_replace(999999999, '%#%', esc_url(get_pagenum_link(999999999))),
|
||||
'format' => '?paged=%#%',
|
||||
'current' => max(1, get_query_var('paged')),
|
||||
'total' => $wp_query->max_num_pages,
|
||||
'prev_text' => '«',
|
||||
'next_text' => '»',
|
||||
'type' => 'plain',
|
||||
'add_args' => false,
|
||||
'add_fragment' => '',
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php get_template_part("template-parts/no-posts"); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<!--[/archive/list]-->
|
||||
Reference in New Issue
Block a user