创建自定义页面模板
我刚刚在 WP Admin Dashboard 中创建了“关于我们”页面,该页面指向我创建的 about-us.php 页面模板,并且有一个空的 div 内容,即
<div id="content"></div>
在这里我想获取的内容wp-admin 用户在仪表板“关于我们”页面中输入,并将此内容放入“
<div id="content">[Dashboard About Us Page Content to go Here]</div>
基本上想要从“关于我们”WordPress 页面获取全部内容,并将其输入到我的 about-us.php 页面模板内容 DIV 中。
我怎样才能实现这个目标?
I have just created my "About Us" page inside WP Admin Dashboard, that points to an about-us.php page template that I created and has a empty div content, i.e.
<div id="content"></div>
It is in here where I would like to grab the content that the wp-admin user enters in the dashboard About Us page and place this content within my
<div id="content">[Dashboard About Us Page Content to go Here]</div>
Basically want to take the whole content from the "About Us" WordPress page and feed this into my about-us.php page template content DIV.
How can I achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将其粘贴到空 div 内,它将动态地拉入内容。在此处阅读有关循环的更多信息:
http://codex.wordpress.org/The_Loop
Stick that inside the empty div and it will pull the content in dynamically. Read more about the loop here:
http://codex.wordpress.org/The_Loop