[wp-trac] [WordPress Trac] #21658: Meaningless adjacent post links for pages
WordPress Trac
noreply at wordpress.org
Wed May 14 19:56:02 UTC 2014
#21658: Meaningless adjacent post links for pages
-------------------------------+-----------------------------
Reporter: mdgl | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Posts, Post Types | Version: 3.4.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
-------------------------------+-----------------------------
Changes (by alexander.rohmann):
* keywords: needs-patch => has-patch
Comment:
Added an `is_page` condition.
{{{
/**
* Display relational links for the posts adjacent to the current post for
single post pages.
*
* This is meant to be attached to actions like 'wp_head'. Do not call
this directly in plugins or theme templates.
* @since 3.0.0
*
*/
function adjacent_posts_rel_link_wp_head() {
if ( !is_singular() || is_attachment() || is_page() )
return;
adjacent_posts_rel_link();
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21658#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list