之外我在我的定制网站WordPress的博客,我显示来自WordPress博客的一些文章到我的网站基于标签,如下面显示WordPress的某些部分发布的WordPress博客
require('../news/wp-blog-header.php');
$query = new WP_Query('tag=Dalaman');
if ($query->have_posts()):
while ($query->have_posts()) : $query->the_post();
?>
<h3> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_content();?></p>
<?php
endwhile;
endif;
the_content
显示10 posts
从WordPress数据库基于WP_Query
问题:我想显示文章的某一部分,让我们说55个chracters 岗位,我的数据库不具有默认excerpt
,我做NT要使用the_exerpt()
因为它删除HTML代码和我的帖子包含<img>
对每一个岗位
我尝试了很多事情,但徒劳都去了,我也用PHP的substr()
功能的开始,但它并没有在这种情况下工作。
那么我如何显示帖子的某些部分与图像?
非常感谢。
亲切的问候!
哦克拉,它的工作。谢谢队友! – user1458253