duansha8115 2013-10-09 20:14
浏览 30

自定义帖子类型相当于Wordpress中的“帖子页面”设置

I am trying to setup a custom post type plugin in wordpress that allows for selecting a page that will produce the posts list in the same fashion as setting the "Posts page" setting so that when the url of the page is accessed it produces the custom post types archive page instead of the page content.

I have option for selecting the page to use setup and it uses the pages slug as the rewrite slug for the custom post type, I just can't figure out how to get it to display the archive instead of the page content.

  • 写回答

2条回答 默认 最新

  • douzhuo1858 2013-10-09 20:29
    关注

    Based on the WordPress Template Hierarchy, assuming you're using a custom post of type Foo, you want to put your archive code in archive-foo.php.

    评论

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀