Support » Fixing WordPress » Using Images with wp_link_pages
5 years, 9 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!
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" />'))); ?>
5 years, 4 months ago
Thanks! It’s not in the codex, so I’m glad you were able to dig that up!