How can I make the arrow as part of the link please?
<?php next_post_link('%link →'); ?>
The output of above will be | <a href="nextPostLink">NextPostTitle<a> arrow
|
How can I make the arrow as part of the link please?
<?php next_post_link('%link →'); ?>
The output of above will be | <a href="nextPostLink">NextPostTitle<a> arrow
|
You must be logged in to post a comment.
As the documentation for
next_post_link
states, the link parameter is where the actual text of the %link placeholder goes. The format parameter is the whole text, where %link is unpacked from the second link parameter. Solution:Expected output:
<a href="...">Title →</a>
Something like this, on the other hand:
…will result in:
Over to <a href="...">--- Title ---</a> now!
See how these are unpacked?