Advertisement
BakerMan

Don't allow 404s on empty list views

Feb 20th, 2014
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.21 KB | None | 0 0
  1. add_action( 'wp', 'clear_404_on_list_view' );
  2.  
  3. function clear_404_on_list_view() {
  4.     global $wp_query;
  5.     if ( ! tribe_is_list_view() || ! is_404() ) return;
  6.     $wp_query->is_404 = false;
  7.     status_header( 200 );
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement