[resolved] Using Images with wp_link_pages (3 posts)

  1. JRiley21
    Posted 4 years ago #

    Hi all. :)

    Can someone tell me how I can assign images to the following code string?

    <?php wp_link_pages('before=&after=&next_or_number=next&pagelink=Next page') ?>

    I basically just want to tell it to display two images - one for the next page link, and one for the previous page link.

    Right now, it just displays text for the previous page and next page links.

    Any help would be greatly appreciated!


  2. JRiley21
    Posted 4 years ago #

    It took me forever to figure out a solution for this, but for anyone that runs across this post and need it, here's what worked for me:

    <?php wp_link_pages(array('before' => '<div class="pagenav" style="text-align: center";><strong></strong>', 'after' => '</div>', 'next_or_number' => 'next', 'nextpagelink' => __('<img src="IMAGE SRC HERE" />'), 'previouspagelink' => __('<img src="IMAGE SRC HERE" />'))); ?>

  3. kato
    Posted 3 years ago #

    Thanks! It's not in the codex, so I'm glad you were able to dig that up!

Topic Closed

This topic has been closed to new replies.

About this Topic