Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #29663, comment 1


Ignore:
Timestamp:
09/14/2014 04:39:54 PM (11 years ago)
Author:
kaprice
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29663, comment 1

    initial v1  
    66After:
    77[[Image(http://i1252.photobucket.com/albums/hh570/Ken_Ken_Price/test2_zps6c4ddb50.png)]]
     8
     9
     10Edit: I used modified content.php of the twentyfourteen theme this time, and added a call to next_post_link on line 62.
     11
     12{{{
     13        <div class="entry-content">
     14                <?php
     15                        the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
     16                        wp_link_pages( array(
     17                                'before'      => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
     18                                'after'       => '</div>',
     19                                'link_before' => '<span>',
     20                                'link_after'  => '</span>',
     21                        ) );
     22               
     23                        next_post_link( '%link', '%title', false, '2');
     24                ?>
     25               
     26        </div><!-- .entry-content -->
     27}}}
     28
     29When you pass true as the third argument, next_post_link will check to see if the link is in the same taxonomy term as specified in the fifth argument ('category' by default). I was able to replicate the effect you described, but ostensibly it is not a bug.