Adding class to current page in wp_link_pages (2 posts)

  1. yans_fied
    Posted 3 years ago #

    We can pass some argument for wp_link_pages, including before pagination and after, but I can't find argument for adding content before and after "Current Page" , so we can't add class to current page.

    Currently the current page rendered without any HTML tag/rendered as plain text. I need to add extra HTML tag to current page like <span class="current">Page 1</span>

  2. LastForOne
    Posted 3 years ago #

    you can use WP-PageNavi plugin instead of hardcoding it into your theme, but here's a snippet from Bones The WordPress Starter Theme to hardcode the PageNavi with custom output, have a look.

    Paste: http://pastebin.com/udwKkV5h


Topic Closed

This topic has been closed to new replies.

About this Topic