Wordpress Post Type

更新日期: 2017-02-04 阅读次数: 5563 分类: wordpress

Wordpress 默认带的 post type

  • Post (Post Type: ‘post’)
  • Page (Post Type: ‘page’)
  • Attachment (Post Type: ‘attachment’)
  • Revision (Post Type: ‘revision’)
  • Navigation menu (Post Type: ‘nav_menu_item’)

post 与 page 的区别

  • post 有时间戳,而page没有
  • post 可以有 catigories 和 tags,而 page 没有
  • page 可以按照层级结构进行组织

custom post type 与 post 的区分展示

Post 对应的展示文件 single.php / single-post.php

Custom post type 对应的展示文件 single-{post-type}.php

taxonomies 与 categories/tags 的区别

Categories, tags 统称为 taxonomies

关于作者 🌱

我是来自山东烟台的一名开发者,有敢兴趣的话题,或者软件开发需求,欢迎加微信 zhongwei 聊聊, 查看更多联系方式