• Since I updated my theme to include title-tag support, page numbers are no longer showing in multi-page titles.

    I’d previously used conditional title tags to handle this, but core should now do this instead.

Viewing 1 replies (of 1 total)
  • Thread Starter gulliver

    (@gulliver)

    UPDATE: Page numbers are added to paginated posts, but not pages.

    Before switching to title-tag support, I’d used conditional page titles with this code to add page numbers topaginated posts/pages:

    if ($paged >= 2 || $page >= 2 ) echo ' ' . sprintf( __('(page %s)'), max($paged, $page) );

    General-template.php in core includes the line below, which seems to add the numbering to posts – but not pages.

    // Add a page number if necessary.
    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
    $title['page'] = sprintf( __( 'page %s' ), max( $paged, $page ) );
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Since switching to title-tag, page numbers no longer in title’ is closed to new replies.