Forums

[resolved] Using Images with wp_link_pages (3 posts)

  1. JRiley21
    Member
    Posted 10 months 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!

    Thanks!

  2. JRiley21
    Member
    Posted 10 months 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
    Member
    Posted 5 months ago #

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

Reply

You must log in to post.

About this Topic