• 欢迎访问爱玩吧
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏爱玩吧

[WordPress]查询参数(WordPress Query Vars)完全列表

建站资源 aiwanyule 7年前 (2017-05-29) 已收录
文章目录[隐藏]

[WordPress]查询参数(WordPress Query Vars)完全列表

WordPress 查询参数分公开(Public)和私用(Private),公开就是可以博客链接加入参数就可以查询数据,而私有只能在代码中通过参数传递WP_Query class。

WordPress 的公开查询参数

  • attachment
  • attachment_id
  • author
  • author_name
  • cat
  • calendar
  • category_name
  • comments_popup
  • cpage
  • day
  • error
  • exact
  • feed
  • hour
  • m
  • minute
  • monthnum
  • more
  • name
  • order
  • orderby
  • p
  • page_id
  • page
  • paged
  • pagename
  • pb
  • post_type
  • posts
  • preview
  • robots
  • s
  • search
  • second
  • sentence
  • static
  • subpost
  • subpost_id
  • taxonomy
  • tag
  • tb
  • term
  • w
  • withcomments
  • withoutcomments
  • year
  • category__in
  • category__not_in
  • category__and
  • comments_per_page
  • offset
  • perm
  • post__in
  • post__not_in
  • post_mime_type
  • post_parent__in
  • tag__and
  • tag__in
  • tag__not_in
  • tag_id
  • tag_slug__and
  • tag_slug__in
  • meta_key
  • meta_value

WPJAM Basic 新增的公开查询参数

  1. tag_id 设置为公开查询参数。
  2. 如果定义了自定义分类,那么 $custom_taxonomy.'_id' 也会自动被设置为公开查询参数。
  3. 添加了 module 和 action 这两个 Public Query Vars,用于插件的路由规则。

爱玩吧 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:[WordPress]查询参数(WordPress Query Vars)完全列表
喜欢 (0)