$datetime1 = date_create($row['date']); // берем дату из БД там к примеру в данный момент лежит 2019-07-31
$datetime2 = date_create(date('Y-m-d'));
$interval = $datetime1->diff($datetime2)->format('%R%a');
$deleteDay = 30;
if ($interval <= $deleteDay) {
выполняю код
}
$data = the_field('form_name', 297);
global $post;
echo $post->ID;
<?php get_header(); // вставка header.php
global $post;
echo $post->ID;
?>
<!--========== HEADER ==========-->
<?php if (is_user_logged_in()){
echo '<header class="header navbar-fixed-top" style="margin-top:30px;">';
}else{
echo '<header class="header navbar-fixed-top">';
} ?>
<!-- Navbar -->
<nav class="navbar" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="menu-container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="toggle-icon"></span>
</button>
<!-- Logo -->
<div class="logo">
<a class="logo-wrap" href="index.html">
<img class="logo-img logo-img-main" src="<?php bloginfo('template_url'); ?>/img/logo.png" alt="Asentus Logo">
<img class="logo-img logo-img-active" src="<?php bloginfo('template_url'); ?>/img/logo-dark.png" alt="Asentus Logo">
</a>
</div>
<!-- End Logo -->
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse nav-collapse">
<div class="menu-container">
<?php
wp_nav_menu( [
'theme_location' => 'header-menu',
'menu' => '',
'container' => 'div',
'container_class' => '',
'container_id' => '',
'menu_class' => 'navbar-nav navbar-nav-right',
'menu_id' => '',
'echo' => true,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'depth' => 0,
//'walker' => new True_Walker_Nav_Menu(),
] );
?>
</div>
</div>
<!-- End Navbar Collapse -->
</div>
</nav>
<!-- Navbar -->
</header>
<!--========== END HEADER ==========-->
<!--========== SLIDER ==========-->
<div id="carousel-example-generic" class="carousel slide">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img class="img-responsive" src="<?php bloginfo('template_url'); ?>/img/1920x1080/01.jpg" alt="Slider Image">
<div class="container">
<div class="carousel-centered">
<div class="margin-b-40">
<h1 class="carousel-title">Hi-Tech Design</h1>
<p>Lorem ipsum dolor amet consectetur adipiscing dolore magna aliqua <br/> enim minim estudiat veniam siad venumus dolore</p>
</div>
<a href="#" class="btn-theme btn-theme-sm btn-white-brd text-uppercase">Explore</a>
</div>
</div>
</div>
</div>
</div>
<!--========== SLIDER ==========-->
<!--========== PAGE LAYOUT ==========-->
<!-- Latest Products -->
<div class="content-lg container">
<div class="row margin-b-40">
<div class="col-sm-6">
<h2>Latest Products</h2>
<p>Lorem ipsum dolor sit amet consectetur adipiscing elit sed tempor incididunt ut laboret dolore magna aliqua enim minim veniam exercitation</p>
</div>
</div>
<!--// end row -->
<div class="row">
<?php
$temp = $wp_query; $wp_query= null;
$wp_query = new WP_Query(); $wp_query->query('showposts=3' . '&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<!-- Latest Products -->
<div class="col-sm-4 sm-margin-b-50">
<div class="margin-b-20">
<div class="wow zoomIn" data-wow-duration=".3" data-wow-delay=".1s">
<?php echo get_the_post_thumbnail( $id, array(360,240), array('class' => 'img-responsive') ); ?>
</div>
</div>
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <span class="text-uppercase margin-l-20"></span></h4>
<p><?php the_excerpt(); ?></p>
<a class="link" title="подробнее" href="<?php the_permalink(); ?>">Подробнее</a>
</div>
<!-- End Latest Products -->
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
</div>
<!--// end row -->
</div>
<!-- End Latest Products -->
<!-- Clients -->
<?php
echo 123;
the_field('dfgdfg');
$images = get_field('partners_galery');
if( $images ):
echo 3333333; ?>
<ul>
<?php foreach( $images as $image ): ?>
<li>
<a href="<?php echo $image['url']; ?>">
<img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
</a>
<p><?php echo $image['caption']; ?></p>
</li>
<?php endforeach; ?>
</ul>
<?php endif;
echo 123; ?>
<?php get_footer(); // footer.php ?>