Paginated page titles
-
I have a page with 11 paginated parts. Google shows these as ‘Page title – page 2 of 11’. Is there a way to have a custom title for each subpage?
I’ve tried this code but that didn’t do anything:
function custom_specific_pagination_title( $title ) {
$specific_page = 2; // Specifieke pagina waarvoor u de paginatitels wilt aanpassen
$specific_titles = array(
1 => “Titel voor pagina 1”,
2 => “Titel voor pagina 2”,
3 => “Titel voor pagina 3”,
// Voeg meer paginanummers en bijbehorende titels toe indien nodig
);if ( is_paged() && is_page( $specific_page ) ) {
$paged_title = $specific_titles[ get_query_var( ‘paged’ ) ];
$title = $paged_title;
}return $title;
}
add_filter( ‘pre_get_document_title’, ‘custom_specific_pagination_title’ );
- The topic ‘Paginated page titles’ is closed to new replies.