Hi,
Thank you very much for your kind words!
Unfortunately this is not possible I’m afraid. I can try suggesting a custom coded solution, but it may not work in all cases, or at all.
add_filter('asp_results', 'asp_remove_attachments_by_cpt', 10, 1);
function asp_remove_attachments_by_cpt($results) {
foreach ( $results as $k => &$r ) {
if ( $r->content_type == 'attachment' ) {
$p = get_post(wp_get_post_parent_id($r->id));
if ( $p->post_type != 'working_paper' ) {
unset($results[$k]);
}
}
}
return results;
}
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.