0

So I've been staring at the CodeX for about 10 minutes and can still not figure how to do this next and previous on a the post page.

So I've added <?php next_post_link(); ?> and <?php next_previous_link(); ?> to my page and works perfectly but I want it to say Next Post and Previous Post instead of the blog title. I've done this <?php next_post_link('% &raquo; &raquo; ', '', 'yes'); ?> copied and pasted it straight from the WordPress CodeX and not even that works it gives me the two arrows and a percentage sign.

Am I doing something wrong? I'm grateful for any help :)

Regards, Stephen

2

Use the following for with Custom Text with Link. The above given code by @TheDeadMedic works only with text but no link.

Code With Link and Custom Text like this:

<?php previous_post_link( '%link','Previous Post' ) ?>
<?php next_post_link( '%link','Next Post' ) ?>

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.