Different behaviour for next and previous links
-
Hi
I have a small problem to find the correct if-statement to show different behaviour for the next and previous link in single.php.
For all categories which is showned beside category id=22 I want this:
<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ), FALSE, '22'); ?></span> <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ), FALSE, '22'); ?></span>
which works fine
but for category with id=22 I want this:<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> Previous', 'twentyeleven' ), TRUE, '22'); ?></span> <span class="nav-next"><?php next_post_link( '%link', __( 'Next <span class="meta-nav">→</span>', 'twentyeleven' ), TRUE, '22'); ?></span>
So which if-statement should I use in single.php to get this to work?
Per
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Different behaviour for next and previous links’ is closed to new replies.