dousi6405 2014-08-22 06:57
浏览 33

WordPress archive-custom.php页面无效

I am new in WordPress. I have a custom post type and from that custom post type, one post will show in home page, and below that post there is a link. When visitors will click on that link, it will take them in a page where all posts of that custom post type will show with pagination.

What I have done so far. - Created custom post type.

  • Called one post in home page.( Upto that it's working fine. )

  • Created a archive-custom.php template.

But couldn't solve that link. Php the permalink doesn't work. Also if I try to access the archive page by mysite.com/archive-custom.php no post shows there.

Search in Google, stackoverflow, wordpress codex . But unfortunately ended up with no result.

Any suggestions on how to solve this

  • 写回答

2条回答 默认 最新

  • duane9322 2014-08-22 07:09
    关注

    Better way to develop archive page for a custome postype is, copy the code from archive.php (of coarse from your current theme folder) and paste it on newly created page "archive-yourpostype.php" . Then start tweaking on the code.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度