Hi Hector:
The code you noted above to include items marked as published or inherited:
/**
* Have WPP list attachments.
*
* @param string $where Original WHERE clause from WPP_Query class.
* @param array $options Plugin settings.
* return string
*/
wp4649_wp_popular_attachments($where, $options){
// Set post_status to "inherit"
$where = str_replace("p.post_status = 'publish'", "p.post_status = 'inherit'", $where);
return $where;
}
add_filter( 'wpp_query_where', 'wp4649_wp_popular_attachments', 10, 2 );
In which file(s) should that code be added?
Thanks.
-
This reply was modified 5 years, 11 months ago by marckw.