WordPress.org

Support

Support » Themes and Templates » Adding current to wp_link_page

Adding current to wp_link_page

  • Good day folks, I almost killed my self searching how to add current property to pagination inside posts.

    This is not question, I just want to share solution I came up with to make some one life easier.

    So here we go.

    In same page or inside function.php add this code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    In my example I used <b></b>, you can easily change that, by changing ‘highlight’ => ‘b’ to anything you need.

    Now where you want your pagination to be add:

    <?php wp_link_page_modified('before=<div id="pagination">&after=</div>&link_before =<span>&link_after=</span>'); ?>

    And your end html will be something like:

    <div id="pagination"> <b>1</b> <a href="#">2</a></div>

    Thats all. Hope you will find that helpful.

  • The topic ‘Adding current to wp_link_page’ is closed to new replies.