Support

Account

Home Forums General Issues get_field not returning value Reply To: get_field not returning value

  • Are you sure that the field is returning nothing or could stringtotime() not be evaluating the returned value correctly?

    
    <?php while ( have_posts() ) : the_post(); ?>;
      <?php	// skip expired posts
             $expirationtime = get_field("expiration");
             // try outputting the values
             echo $expirationtime,': ',strtotime($expirationtime);
             if ($expirationtime) {
               $secondsbetween = strtotime($expirationtime)-time();
               if ($secondsbetween <= 0) continue;
    	  }
      ?>;