The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

Style Current Page in WordPress wp_link_pages

  • # January 8, 2013 at 4:23 pm

    I’m using a modified form of wp_link_pages at []( “”)

    When a div is added, we can obviously style the links. But what if I want to style the non-linked current page (the number ‘2’ in this example)… is there a way to achieve this via CSS alone?

    I should mention, I realize I can assign unique CSS to the links and then mess with the size, color, etc of the entire div to change the un-linked current page. But what if I want to add a specific background color or padding – then I’d need to target that specific page number.

    If anybody has any ideas I’d love to hear them! :-)

    # January 8, 2013 at 4:28 pm


    # January 8, 2013 at 4:57 pm

    This reply has been reported for inappropriate content.

    Thanks Chris, but what the styling would have to be applied to whichever link is unlinked… no matter the page the user is on so I don’t believe that would work (unless I’m completely missing something obvious).

    # January 9, 2013 at 3:46 am

    @siouxfan45 – I use the built in WordPress class that is applied to each current page link and it looks something like this;

    .current_page_item {

    /* Insert current page styling here */


    # January 9, 2013 at 11:15 am

    This reply has been reported for inappropriate content.

    Thanks Watson, but current_page_item is for menus. I’m working with WP_LINK_PAGES.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed