• Resolved ABCwebsites

    (@abcwebsites)


    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’ );

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support devnihil

    (@devnihil)

    @abcwebsites Unfortunately we can’t offer support on custom code. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. Maybe someone watching these forums can assist you further, but if your topic is inactive, we’ll mark it as resolved to keep the overview.

    However, if you are wanting to different page titles due to receiving a duplicate meta description/title issue, you can avoid having duplicate titles or meta descriptions by adding the %%page%% variable to your pages.

    We also have more information on using the template variables here: https://yoast.com/help/list-available-snippet-variables-yoast-seo/

    Plugin Support Maybellyne

    (@maybellyne)

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Paginated page titles’ is closed to new replies.