is_paged() - WordPress 函数参考中文文档

返回介绍

is_paged()

发布于 2017-09-11 字数1412 浏览 973 评论 0

is_paged()

Is the query for paged result and not for the first page?


描述


返回值

(bool)


源代码

File: wp-includes/query.php

function is_paged() {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
		return false;
	}

	return $wp_query->is_paged();
}

更新日志

Version 描述
1.5.0 Introduced.

相关函数

Uses

  • wp-includes/l10n.php:
    __()
  • wp-includes/class-wp-query.php:
    WP_Query::is_paged()
  • wp-includes/functions.php:
    _doing_it_wrong()

Used By

  • wp-includes/class-wp.php:
    WP::handle_404()
  • wp-includes/post-template.php:
    wp_page_menu()
  • wp-includes/post-template.php:
    get_post_class()
  • wp-includes/post-template.php:
    get_body_class()

User Contributed Notes

上一篇:is_page()

下一篇:is_page_template()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!