admin管理员组文章数量:1332865
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
Note: Only the value from 'new_views' will be increment every time a post gets visited. 'old_views' won't be incremented anymore, but I still need to sum both values for old posts published.
本文标签: How to get the total of two meta values from different meta keys
版权声明:本文标题:How to get the total of two meta values from different meta keys? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742293745a2448306.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论