daily pastebin goal
44%
SHARE
TWEET

Don't allow 404s on empty list views

BakerMan Feb 20th, 2014 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top