Support

Account

Home Forums General Issues Where in the DB is the Data stored? Reply To: Where in the DB is the Data stored?

  • This is the code I’m trying to hack together. This returns a list of values for each field. Now I need to figure out how to add (sum) them together.

    Any ideas?

    
    $posts = get_posts(array(
         'posts_per_page'	=> -1,
         'post_type'	=> 'pov_travel'
          ));
          ?>
    
          <?php 
              if( $posts ): 
              $dla = 0;
           ?>
                                
           <?php foreach( $posts as $post ): ?>
                <?php 
                     $dla = get_field ('dla');
                     echo  $dla;
                ?>
                        
            <?php endforeach; ?>
            <?php endif; ?>