admin管理员组文章数量:1294707
Bit of an awkward one here, and there may not be a solutions within current WP core.
Basically I have a CPT called "connection" with a custom meta field called "outcome" which stores an integer.
I'd like to list the sum of all "outcome" fields on all "connection" posts, by author.
E.g. User 1 has authored 10 "connections", with their combined "outcome" field equalling [int].
I know how to list the number of "connections" authored, with count_user_posts( $user->ID , 'connection' );
but am stuck on the rest.
I've tried doing post queries, but that didn't seem to be the right direction as it lists each individual post whereas I'm needing to combine totals and metadata.
Any thoughts?
本文标签: custom fieldQuery posts by post typeauthor and post meta
版权声明:本文标题:custom field - Query posts by post type, author and post meta 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741605437a2387948.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论