<?php
$term = $wp_query->queried_object;
$getterm = $term->slug; // get current slug (E.g. activity_running)
$posts = get_posts(array(
"post_type" => "posttype",
'tax_query' => array(
array(
'taxonomy' => 'taxonomies,
'field' => 'slug',
'terms' => $getterm,
'include_children' => true,
'operator' => 'IN'
),
),
"numberposts" => "-1",
'post_status' => 'publish',
'order' => 'DESC',
));
?>
<?php
foreach ($posts as $post){
setup_postdata($post);
?>
html
<?php
}
wp_reset_postdata();
?>
$more = 1;
<?php if (have_posts()) { echo '<div class="item">'; while (have_posts()) { the_post();
if (0 !== $wp_query->current_post && 0 === $wp_query->current_post%10) {
echo '</div><div class="item">';
} ?>
код
<?php }
echo '</div>';
} ?>
Перенес файлы сайта на другой хостинг
<a href="<?php next_post_link('%link', 'Следующий пост: ->', TRUE); ?>">Текст кнопки</a>
<?php
$next_post = get_next_post();
if (!empty( $next_post )): ?>
<a href="<?php echo esc_url( get_permalink( $next_post->ID ) ); ?>"><?php echo esc_attr( $next_post->post_title ); ?></a>
<?php endif; ?>