How can I modify:
<?php previous_post_link('« %link') ?> | <?php next_post_link('%link »') ?>
in single.php to NOT display the post title as a link, but something like "next" or "previous" instead?
All code for single.php:
Refer to the Codex entry for previous_post_link().
previous_post_link( $format, $link, $in_same_cat, $exclude_categories ) accepts four arguments:
- $format: string format of the link, using the %link% placeholder for the HTML link. Default: "%link% »"
- $link: text (string) to display within the HTML link. Default: "%title%" (Post Title)
- $in_same_cat: boolean (TRUE/FALSE) value to specify if linked post must be in the same category as the
current post. Default: FALSE
- $exclude_categories: list of categories by ID, separated by 'and', to exclude. Default: none.
So, to display "Previous", rather than the Post Title, change the second argument to "Previous", rather than "%title%"
This topic has been closed to new replies.