WordPress修改文章列表显示摘要
来源:互联网 发布:平面动画制作软件 编辑:程序博客网 时间:2024/04/28 05:00
分类: Web前端 实验室2014-01-29 02:50 604人阅读 评论(0) 收藏 举报
用WordPress 3.8开的个人博客longt.me,在主页,分类页,搜索页时均为全文,文章多了效果不太好,查了一下官方文档,修改为首页显示摘要,具体方法如下:
进入外观-〉编辑,选择content.php,将下面代码:
- <?php if ( is_search() ) : ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php
- the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) );
- wp_link_pages( array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- ) );
- ?>
- </div><!-- .entry-content -->
- <?php endif; ?>
替换为:
- <?php if ( is_single() ) : // Only display full content for Single page ?>
- <div class="entry-content">
- <?php
- the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) );
- wp_link_pages( array(
- 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
- 'after' => '</div>',
- 'link_before' => '<span>',
- 'link_after' => '</span>',
- ) );
- ?>
- </div><!-- .entry-content -->
- <?php else : ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php endif; ?>
0 0
- WordPress修改文章列表显示摘要
- WordPress修改文章列表显示摘要
- 修改wordpress中twentytwelve主题显示文章摘要
- wordpress 首页文章显示摘要
- 让WordPress文章自动截断显示摘要
- 显示 wordpress 文章摘要函数the_excerpt
- WordPress文章列表缩略显示,文章摘要插件 WP Limit Posts Automatically导致末尾乱码——解决办法
- wordpress文章摘要
- wordpress文章摘要功能
- WordPress批量修改文章内容、URL链接、文章摘要
- 修改wordpress列表页默认显示文章的数量和排序方式
- 如何在WordPress主题中显示文章摘要
- wordpress显示最新的一篇文章的缩略图和摘要
- 下面介绍四种WordPress 显示文章摘要方法:
- WordPress 首页显示摘要
- 网站调用Wordpress函数,显示博客列表以文章
- 如何在wordpress显示摘要
- Wordpress摘要显示更多文字
- android实现圆形ImageView
- 链表创建
- ECC纠错算法
- 编程语言基础知识
- UVA 10427 Naughty Sleepy Boys
- WordPress修改文章列表显示摘要
- LeetCode OJ - Word Ladder II
- hdu 3033 I love sneakers!(分组背包)
- 《Lost》大结局最权威最彻底解读
- jQuery源码分析笔记--1
- ZOJ3810(2014年牡丹江网络赛B题)
- 得到地图中NPc,hero的位置
- arcSDE for Linux 安装过程中的问题
- windows下git bash显示中文