Support » Fixing WordPress » wp_title problem with pagination

  • I’m having some problems with the title that wp_title function generates for my site.
    When browsing category pages, the function outputs the category name as the title, as it should. Except when pagination is working: if there is more than one page, wp_title will return “page not found” as the title for the last page in the pagination. The category name displays fine for the rest.

    I’m using the filter for wp_title found in the TwentyTen theme which adds some other stuff to the title, but that’s not causing the problem, I tried removing it.

    I checked the wp_title function in general-template.php, and the “page not found” should be retuned in a “if(is_404())” condition only, which obviously is not the case.

    Any help would be much appreciated.
    The site url is
    You can see the problem in action here:

    Thanks a lot!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m having the same problem. Pagination works, except when you go to page 2 or more, it loses the Category name and displays “Page not Found – [site title]” with my setup.


    Seems to go deeper than that. When accessing everything after the first page in a category, it doesn’t use the category template anymore.

    Any tips would be greatly appreciated!

    Moderator keesiemeijer


    Try putting this before the loop in your theme’s archive.php or category.php:

    if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }
    elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }
    else { $paged = 1; }
    global $query_string;
    query_posts( $query_string . '&paged='.$paged );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_title problem with pagination’ is closed to new replies.