dongpang1232
2015-09-05 11:11
浏览 42
已采纳

Wordpress无法显示自定义帖子

I was trying to create custom posts, Admin site work well but posts are not displayed on client side Tutorial I followed

  1. http://code.tutsplus.com/tutorials/a-guide-to-wordpress-custom-post-types-creation-display-and-meta-boxes--wp-27645
  2. https://www.elegantthemes.com/blog/tips-tricks/how-to-create-a-wordpress-plugin

Both tutorial does not work for me.

I am able to create new custom posts (Review type (music, movie)) When I Click on View post button it take me to http://localhost/test001/music_review/mama-love/ While page says

"Oops! That page can’t be found."

However If I search "Mama Love" result shows an entry for it but when clicked, it again take me to the above link with same error. This has worked for me only once. I tried both tutorials separately with new Worpress site(So they both are not conflicting).

图片转代码服务由CSDN问答提供 功能建议

我试图创建自定义帖子,管理网站工作正常,但帖子没有显示在客户端 教程我跟着

  1. http://code.tutsplus.com/tutorials/a-guide-to-wordpress-custom-post-types-creation-display-and- 元框 - wp-27645
  2. https://www.elegantthemes.com/blog/tips-tricks/how-to-create-a-wordpress-plugin

    这两个教程对我都不起作用。

    能够创建新的自定义帖子(评论类型(音乐,电影) ) 当我点击查看帖子按钮时,它会转到 http:// localhost / test001 / music_review / mama-love / 当页面上写着 < blockquote>

    “哎呀! 无法找到该页面。“

    但是,如果我搜索”Mama Love“结果显示了一个条目,但点击后,它再次带我到 上面的链接有相同的错误。 这对我只有一次。我分别用新的Worpress网站尝试了两个教程(所以它们都没有冲突)。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doudao5287 2015-09-05 15:52
    已采纳

    Once you've registered a custom post type you need to flush your rewrite rules.

    1. In the WordPress admin to go Settings -> Permalinks
    2. Press "Save Changes"
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题