Use is_single().
git-svn-id: http://svn.automattic.com/wordpress/trunk@1537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f510f2a85d
commit
b3c8f86b0b
|
@ -244,10 +244,10 @@ function edit_comment_link($link = 'Edit This', $before = '', $after = '') {
|
|||
|
||||
function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
|
||||
global $id, $post, $wpdb;
|
||||
global $p, $posts, $posts_per_page, $s, $single;
|
||||
global $posts, $posts_per_page, $s;
|
||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||
|
||||
if(($p) || ($posts_per_page == 1) || 1 == $single) {
|
||||
if(($posts_per_page == 1) || is_single()) {
|
||||
|
||||
$current_post_date = $post->post_date;
|
||||
$current_category = $post->post_category;
|
||||
|
@ -281,8 +281,8 @@ function previous_post($format='%', $previous='previous post: ', $title='yes', $
|
|||
}
|
||||
|
||||
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
|
||||
global $posts_per_page, $post, $wpdb, $single;
|
||||
if(1 == $posts_per_page || 1 == $single) {
|
||||
global $posts_per_page, $post, $wpdb;
|
||||
if(1 == $posts_per_page || is_single()) {
|
||||
|
||||
$current_post_date = $post->post_date;
|
||||
$current_category = $post->post_category;
|
||||
|
|
Loading…
Reference in New Issue