$post_date = get_the_date( "Y-m-d" ); // дата поста
$current_time = date( "Y-m-d H:i:s" ); // текущее время
$post_date_unix = strtotime($current_time); // Unix
$future_time = date( "Y-m-d H:i:s", strtotime($current_time . ' + 3 hours') ); // +3 часа от текущего времени
join()
if ( is_single() ) {
global $post;
foreach( get_the_category($post->ID) as $category ) {
$classes[] = $category->category_nicename;
}
}
body_class()
и post_class()
или эту статью wp_set_post_terms()
pre_get_posts()
фильтровать основной запрос на не проходящие проверку записиborder-radius: 35% 0% 0% 35% / 50% 0% 0% 50%
<header class="header">
<div class="header__top">
<div class="container"></div>
</div>
<div class="header__bottom">
<div class="container"></div>
</div>
</header>
<div class="body">
<div class="container"></div>
</div>
add_action( 'woocommerce_archive_description', 'custom_text_category_description', 10 );
function custom_text_category_description() {
if ( is_product_category() ) {
echo '<div class="cusom-discount"><p>До 28 сентября в магазине скидки до 40% на ВСЕ товары!</p></div>';
}
}