PHP code to use on next & previouspage links

I’m having an issue with wp_link_pages tag. I want to list the number of pages of each post with ‘next’ and ‘previous’ links that are two image arrows.

To better understand the problem I’m having, please see this URL: http://next.lab501.ro/smartphone/nokia-n9-meego-to-go/2

Read More

At the top of the body you’ll see a list of pages of that post. In the left and right side of the pagination there are two green arrows, I want them to function as links to ‘nextpagelink’ and ‘previouspagelink’.

I’ve read the wordpress codex regarding wp_link_pages and ‘styling page links’ but I still can’t figure this out.

Related posts

Leave a Reply

1 comment

  1. adjust the ‘nextpagelink’ and ‘previouspagelink’ arguments for wp_link_pages() to have a css class you can style

    $args = array(
        'nextpagelink'     => '<span class="next">' . __('Next page') . '</span>',
        'previouspagelink' => '<span class="prev">' . __('Previous page') . '</span>'
    );
    wp_link_pages($args);
    

    then in your css you can style those spans to use your arrows as background images.