$id = $post->ID;
get_page($id);
// then my custom loop
哪个获取当前页面ID,但没有内容 .
2 回答
5
在WordPress中,调用
<?php the_content(); ?>
只要它在循环内部,就会从使用该模板的页面上的WYSIWYG编辑器中提取内容 .
最基本的例子可能如下所示:
<?php while (have_posts()) : the_post();/* Start loop */ ?>
<?php the_content(); ?>
<?php endwhile; /* End loop */ ?>
<!-- Enter your custom loop for displaying posts by category down here -->
2 回答
在WordPress中,调用
只要它在循环内部,就会从使用该模板的页面上的WYSIWYG编辑器中提取内容 .
最基本的例子可能如下所示:
更多信息:http://codex.wordpress.org/Function_Reference/the_content
要使用
the_content()
功能显示页面内容 .在此函数调用后添加了自定义循环 .