Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.05 KB | None | 0 0
  1.                     <?php
  2.                         if(($sel === "luogo") || ($filt === "luogo")) {
  3.                             if((!empty($start)) && (!empty($end))) {
  4.                                 $args = get_posts(
  5.                                     array(
  6.                                         'post_type'      => 'post',
  7.                                         'posts_per_page' => -1,
  8.                                         'meta_query'     => array(
  9.                                             array(
  10.                                                 'key'     => 'usp-custom-60',
  11.                                                 'value'   => $s,
  12.                                                 'compare' => 'LIKE'
  13.                                             )
  14.                                         ),
  15.                                         'date_query' => array(
  16.                                             array(
  17.                                                 'after'     => strtotime($start),
  18.                                                 'before'    => strtotime($end),
  19.                                                 'inclusive' => true,
  20.                                             ),
  21.                                         ),
  22.                                     )
  23.                                 );
  24.                                 $query = new WP_Query( $args );
  25.                                 if ( $query->have_posts() ) {  
  26.                                     while ( $query->have_posts() ) {
  27.                                         $query->the_post(); ?>
  28.                                                 CONTENT
  29.                                         <?php  
  30.                                     }
  31.                                 }
  32.                             }
  33.                         } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement