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; ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.