Skip to:
Content
Pages
Categories
Search
Top
Bottom

wp_title() returning "Page not Found" for profile pages


  • rsanchez1
    Participant

    @rsanchez1

    In my forums, when I go to a user profile page, the title of that page is being shown as “Page not Found”, even though there clearly was a page found since I can see the user’s profile. I’m setting the page title using wp_title(). Any idea what might be going on? How can I make the title the user’s name or at least something that isn’t “Page not Found”?

Viewing 1 replies (of 1 total)

  • rsanchez1
    Participant

    @rsanchez1

    After some more digging around, I found that this only happens because is_404() returns true. As a workaround, I added this line before outputting headers:

    $wp_query->is_404 = false;

    I’d still like to know why it is setting is_404() as true.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar