在wordpress文章中显示自述


Show readmore in wordpress post

在wordpress Twenty Eleven主题中,如何在一篇文章后显示阅读更多内容,而不在文章页面中写入任何<!--read more-->

进入wordpress管理面板,点击阅读下的阅读,选择摘要而不是全文。这将对你有所帮助。

仪表板-->设置-->阅读并单击"摘要"而不是"全文"

编辑:馈送的上述设置。用于在主页中显示,当您添加帖子时,将光标放在要添加"更多"标记的位置,然后单击Alt+Shift+T或单击左侧按钮进行拼写检查,它将在您的帖子上插入更多标记。我想这可能行得通。。

在您的文章中使用_except()函数,并添加filter extract_more和readmore。。链接这个博客使用了我开发的相同功能[最新的智能手机应用程序][1]

[1] :http://latestsmartphoneapps.com在这里的索引页上所有的后summery是给出和自述。。给出链接,然后显示完整的帖子。

如果你想要这样的功能,请告诉我。

将此代码用于摘录。

<?php query_posts('cat=ID'.'&showposts=NO. OF POST') ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_post_thumbnail(); ?>
<p><?php echo substr(get_the_excerpt(), 0,65).' [...]'; ?></p>
<a href="<?php the_permalink(); ?>">Read More...</a>

<?php endwhile; ?>
<?php wp_reset_query(); ?>
<?php endif;?>

查看_except