Forum Replies Created
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
mitchb13
MemberI found the answer. I wish I could figure out where I got the code snippet from to credit it. I hacked a bit of it up to make it work the way I wanted.
The following will add "Page 2", "Page 3", and so on to index, tag, and category pages when added to functions.php.
function theme_name_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() || is_home() ) { // Add a page number if necessary: if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { $title .= " $sep " . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) ); } return $title; } // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title .= " $sep $site_description"; } // Add a page number if necessary: if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { $title .= " $sep " . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) ); } return $title; } add_filter( 'wp_title', 'theme_name_wp_title', 10, 2 );mitchb13
MemberI saw this post and my heart jumped. Too bad this is not solved. I have been looking everywhere to learn how to simply add a page number to the title on category and tag pages. It seems to be impossible.
Anybody out there know how this is done?
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)