创建自定义页面模板

我刚刚在WP Admin控制台内创建了”关于我们”页面, 该页面指向我创建的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中。

我该如何实现?


#1


<?php if(have_posts()): while(have_posts()): the_post();
the_content();
endwhile; endif; ?>

将其粘贴在空div内, 它将动态提取内容。在这里阅读有关循环的更多信息:

http://codex.wordpress.org/The_Loop

来源:

https://www.srcmini02.com/62929.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_42066.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?