posts – Show Next/Previous without Link

Question

I have a question.
Currently I have <?php next_post_link('%link', 'Next Post'); ?> and <?php previous_post_link('%link', 'Previous Post'); ?>.

Both return Next and Previous with a link.
I want it to be Next and Previous without a link. I tried removing the %link from the code, but the text disappeared. I want to use this code without a link because I want the built-in condition.

What should I do to render the text without the link?
Appreciate the help from the community.

0
Jornes 2 months 2022-10-01T00:20:03-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse