Rather than displaying the title of the next page, I would like to display a large arrow that can be clicked on. To do this I shall either be using image files, or the tag.
Can this be done?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
Well, yes, of course. Take a look at this reference:
You can customize it however you like, so you can simply put an html image tag in there. The function must be used in the loop to work. I'd do it like this:
<?php previous_post_link('%link', '<img src="Image URL" width="20" height="20" alt="%title" />'); ?>
The first parameter controls what comes before and after the link. Because we don't want anything before or after the link, but within, it's just the link.
The second parameter is crucial. It says what text should be linked. Here, instead of text we put in the image we want. I've also added the post title as alt attribute.
Same way applies to the next link :)