next_post
函数
next_post ( $format = '%', $next = 'next post: ', $title = 'yes', $in_same_cat = 'no', $limitnext = 1, $excluded_categories = '' )
- 参数
-
-
(string)
$format- Required: 否
- Default: ‘%’
-
(string)
$next- Required: 否
- Default: ‘next post: ‘
-
(string)
$title- Required: 否
- Default: ‘yes’
-
(string)
$in_same_cat- Required: 否
- Default: ‘no’
-
(int)
$limitnext- Required: 否
- Default: 1
-
(string)
$excluded_categories- Required: 否
- Default: (empty)
-
(string)
- 相关
-
- next_post_link()
- 定义位置
-
-
wp-includes/deprecated.php
, line 171
-
wp-includes/deprecated.php
- 引入
- 0.71
- 弃用
- 2.0.0
Prints link to the next post.
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') { _deprecated_function( __FUNCTION__, '2.0.0', 'next_post_link()' ); if ( empty($in_same_cat) || 'no' == $in_same_cat ) $in_same_cat = false; else $in_same_cat = true; $post = get_next_post($in_same_cat, $excluded_categories); if ( !$post ) return; $string = ''.$next; if ( 'yes' == $title ) $string .= apply_filters('the_title', $post->post_title, $post->ID); $string .= ''; $format = str_replace('%', $string, $format); echo $format; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。