{"id":1714665,"date":"2010-10-11T13:11:13","date_gmt":"2010-10-11T13:11:13","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-admin-sql-help\/"},"modified":"2016-08-19T20:00:17","modified_gmt":"2016-08-19T20:00:17","slug":"custom-admin-sql-help","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-admin-sql-help\/","title":{"rendered":"Custom Admin. SQL help."},"content":{"rendered":"<p>We are currently in the middle of some heavy customisation work of the WP admin post section. So far, there are additional tables which are joined via the filters e.g. <\/p>\n<p>add_filter(&#8216;posts_join&#8217;,<br \/>\nadd_filter(&#8216;posts_where&#8217;,<br \/>\nadd_filter(&#8216;posts_orderby&#8217;,<\/p>\n<p>this helps me order the posts via the new fields etc.<\/p>\n<p>As for the columns in the admin &#8211; some stuff done with manage_post_columns..<br \/>\nadd_action(&#8216;manage_posts_custom_column&#8217;<br \/>\nadd_filter(&#8216;manage_posts_columns&#8217;<\/p>\n<p>What I now need, is some advice on the hooks or filters to use for the following interface which showcases post counts&#8230;.<\/p>\n<p> * All (7) |<br \/>\n* Published (7) |<br \/>\n* Trash (2)<\/p>\n<p>Any advice appreciated, I know I&#8217;ll have to do some extra SQL, just not sure where to look at present. With the additional joins and where clauses etc, the above counts are now wrong.<\/p>\n","protected":false},"template":"","class_list":["post-1714665","topic","type-topic","status-closed","hentry","topic-tag-admin-panel","topic-tag-custom-admin"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1714665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1714665\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1714665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}