views_edit-post filter not working (custom post type)
I finally figured this out. What I had above is correct, as far as it goes. But the missing piece was changing the query based on that. So in addition, I needed to add the following code: add_filter( ‘parse_query’,’norelated_filter’ ); function norelated_filter( $query ) { if( is_admin() AND $query->query[‘post_type’] == ‘my-cpt’ ) { if ($_GET[‘norelated’]) … Read more