开发者

Creating custom page templates

开发者 https://www.devze.com 2023-01-12 11:11 出处:网络
I have just cr开发者_运维知识库eated 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.

I have just cr开发者_运维知识库eated 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?


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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号