duvanmonsa (@duvanmonsa)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • duvanmonsa
    Participant

    @duvanmonsa

    I had the same error i did this piece of code and the status code will be force to be 200 in my case was when i was showing the user public profile.

    function bbp_fix_users_404_headers() {
      if (bp_displayed_user_id() != 0 && is_404() ) {
        global $wp_query;
        $wp_query->is_404 = false;
        status_header( 200 );
      }
    }
    add_action( 'wp', 'bbp_fix_users_404_headers',0 );
Viewing 1 replies (of 1 total)