How to get the total of two meta values from different meta keys?
Question
At post meta I have two meta keys: ‘old_views’ and ‘new_views’, so I need a function to get the total value of these both combined and save it as a new meta key called ‘total_views’.
For example:
‘old_views’ = 100
‘new_views’ = 400
‘total_views’ = 500
0
meta-value, post-meta
3 years
2020-07-03T06:11:12-05:00
2020-07-03T06:11:12-05:00 0 Answers
63 views
0
Leave an answer