[wp-trac] [WordPress Trac] #27564: previous_post_link() and next_post_link() returns nothing
WordPress Trac
noreply at wordpress.org
Fri Mar 28 02:00:20 UTC 2014
#27564: previous_post_link() and next_post_link() returns nothing
--------------------------+-----------------------------
Reporter: genkisan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Keywords:
Focuses: template |
--------------------------+-----------------------------
Tested on clean install of WP 3.9 beta 2 with no plugins activated.
'''Case 1: previous_post_link/next_post_link returns nothing when
"in_same_cat" parameter is true'''
In /themes/twentyfourteen/inc/template-tags.php, if you replace
{{{
previous_post_link( '%link', __( '<span class="meta-nav">Previous
Post</span>%title', 'twentyfourteen' ) );
next_post_link( '%link', __( '<span class="meta-nav">Next
Post</span>%title', 'twentyfourteen' ) );
}}}
with
{{{
previous_post_link( '%link', __( '<span class="meta-nav">Previous
Post</span>%title', 'twentyfourteen' ), true );
next_post_link( '%link', __( '<span class="meta-nav">Next
Post</span>%title', 'twentyfourteen' ), true );
}}}
, the previous/next links are not displayed while they worked correctly on
WP 3.8.1.
'''Case 2: previous_post_link/next_post_link returns nothing when
"excluded_terms" parameter is specified'''
In /themes/twentyfourteen/inc/template-tags.php, if you replace
{{{
previous_post_link( '%link', __( '<span class="meta-nav">Previous
Post</span>%title', 'twentyfourteen' ) );
next_post_link( '%link', __( '<span class="meta-nav">Next
Post</span>%title', 'twentyfourteen' ) );
}}}
with
{{{
previous_post_link( '%link', __( '<span class="meta-nav">Previous
Post</span>%title', 'twentyfourteen' ), false, '2' );
next_post_link( '%link', __( '<span class="meta-nav">Next
Post</span>%title', 'twentyfourteen' ), false, '2');
}}}
, again the previous/next links are not displayed while they worked
correctly on WP 3.8.1.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27564>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list