Sum values of custom fields filtered by custom post type and taxonomy
-
How can I sum the values (they are all numeric) of a custom field filtered by the taxonomy of a post type?
For example, I want to sum all the values of the custom field ‘wpcf-litter-puppies’ of the post type ‘puppies’ but only in the taxonomy ‘litter-type’ of ‘previous-litters’.
So…
‘post_type’ => ‘puppies’,
‘taxonomy’ => ‘litter-type’,
‘term’ => ‘previous-litters’,
‘custom_field’ => ‘wpcf-litter-puppies’
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sum values of custom fields filtered by custom post type and taxonomy’ is closed to new replies.