【问题标题】:wordpress custom theme posttype from dashboard appearance issue来自仪表板外观问题的wordpress自定义主题posttype
【发布时间】:2015-03-21 11:12:53
【问题描述】:

我制作了一个静态html页面,我想在本地使用wordpress(wamp)运行这个页面。我把所有必要的文件放到wp_content->themes->theme文件夹名称,例如footer.php index.php header。 php functions.php style.css 并制作了一个名为 custompage.php 的页面模板和一个 page-about-us.php。我已经从 wordpress 仪表板制作了我的页面,我通过向 functions.php 添加一些代码并加载了手动制作了导航菜单wordpress 外观->菜单->菜单设置的三个主题位置。我的页面链接似乎工作正常,但我的问题是当我单击页面时,例如 page-about-us.php 不显示编辑页面 wordpress 中的内容仪表板,但显示我在我的 page-about-us.php 文件中编码的内容。换句话说,我希望当我链接到一个页面时显示我在 wordpress 编辑页面中编写的内容。我想这是用函数完成的。哪些函数或什么解决这个问题?提前谢谢你。

【问题讨论】:

    标签: html wordpress themes dashboard appearance


    【解决方案1】:

    要从 about-us wordpress 管理仪表板页面检索数据,我只需编写 while(have_posts()) : the_post(); 内容(); 结束;在 page-about-us.php 文件中

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-12
      • 1970-01-01
      • 1970-01-01
      • 2013-08-27
      • 2018-09-23
      • 2023-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多