• Resolved gorky5

    (@gorky5)


    Hi. I’ve got a number of posts and pages that are split into multiple pages using <!--nextpage-->.

    The Astra theme adds “Pages: 1 2 3…” links to the bottom of the content area. I’d like these links to also appear at the top of the page, just below the title.

    What code is needed to do this, and where in my child theme should it be added?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gorky5

    (@gorky5)

    No matter, I worked it out. In case anyone else wants to do the same for posts, I copied /template-parts/single/single-layout.php into my child theme and added the following to below <?php astra_entry_content_before(); ?>:

    <?php
    wp_link_pages(
    array(
    'before' => '<div class="page-links">' . esc_html( astra_default_strings( 'string-single-page-links-before', false ) ),
    'after' => '</div>',
    'link_before' => '<span class="page-link">',
    'link_after' => '</span>',
    )
    );
    ?>

    For pages, do the same for /template-parts/single/content-header.php

    • This reply was modified 2 months ago by gorky5.

    Hi @gorky5,

    Thanks for sharing the workaround.

    Don’t hesitate to reach out if you need any further assistance in the future.

    Best regards,
    Aradhy ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.