0
我的代码显示content
和page的title。我只想显示该特定页面内容的150个单词。如何在wordpress中显示页面的有限内容
这里是我的代码
<?php
$args = array(
'include' => 1319,
'post_type' => 'page',
'post_status' => 'publish'
);
$mypages = get_pages($args);
foreach($mypages as $page)
{
$content = $page->post_content;
$content = apply_filters('the_content', $content);
?>
<div class="page_botheadingtop">
<?php echo $page->post_title ?>
</div>
<div class="page_botheadingmiddle">
<?php echo $page->post_content; ?>
</div>
<div class="page_botheadingbottom">
<a href="<?php echo get_page_link($page->ID) ?>">Read More..</a>
</div>
<?php
}
?>
此代码显示,有ID 1319
。我想DISPLY只有150字,请提供给我的建议,页面的所有内容。
我是非常感激你 我等着你的答复 感谢