WordPress.org

Ready to get started?Download WordPress

Forums

Adding current to wp_link_page (1 post)

  1. ignaty
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by ignaty
  • This topic is not a support question
  • WordPress version: 3.2.1