• Hello!

    I want users to be able to press ‘Next Page’ button in a single post to continue to the next page in the same post, pointing to a specific anchor, let’s say #content.

    <?php
        $defaults = array(
            'before'           => '<p>' . __( 'Pages:' ),
            'after'            => '</p>',
            'link_before'      => '',
            'link_after'       => '',
            'next_or_number'   => 'number',
            'separator'        => ' ',
            'nextpagelink'     => __( 'Next page' ),
            'previouspagelink' => __( 'Previous page' ),
            'pagelink'         => '%',
            'echo'             => 1
        );
    
            wp_link_pages( $defaults );
    
    ?>

    These are the arguments I have.

    Any help would be much appreciated. Have a nice day!

  • The topic ‘Using Anchor Link in wp_link_pages’ is closed to new replies.