Calculate sum from loop
-
I am trying to figure out a way to calculate the sum of an ACF number field within a loop and return that value as a single number.
I have a field called ‘calories’ inside a CPT. There is about a dozen posts each with a calorie value that I need to add together.
Is this possible using the [calc] shortcode? If so how do I write that snippet? I haven’t had any luck trying to get it to work.
Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Calculate sum from loop’ is closed to new replies.