Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
course:wordpress_tutorials:how_to_display_news_excerpts:start [2018/10/29 10:20] – riya.li | course:wordpress_tutorials:how_to_display_news_excerpts:start [2018/10/30 10:09] (current) – [List category posts] riya.li | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to display news Excerpts ====== | ====== How to display news Excerpts ====== | ||
显示news的摘要需要用到两个plugins,分别是:List category posts和 Rich Text Excerpts。它们的功能分别是:控制显示news的数量和控制每一条news的摘要的字数。 | 显示news的摘要需要用到两个plugins,分别是:List category posts和 Rich Text Excerpts。它们的功能分别是:控制显示news的数量和控制每一条news的摘要的字数。 | ||
- | * Reference: | + | * Reference:https:// |
+ | |||
+ | |||
+ | ===== Rich Text Excerpts ===== | ||
+ | * 安装好Rich Text Excerpts 这个plugin之后,post的编辑页面会多了一个写“Excerpt”的地方 | ||
+ | * 1.dashboard> | ||
+ | * {{: | ||
+ | * 2.按照要求填写好post title,此处对应的时候news的标题 | ||
+ | * 3.写入news的内容 | ||
+ | * 4.在excerpt区域内写入摘要 | ||
+ | * {{: | ||
+ | < | ||
+ | 在Text”形式下可以加入一些html代码来控制摘要字体的颜色,大小等等 | ||
+ | </ | ||
+ | |||
+ | ===== List category posts ===== | ||
+ | * List category posts是使用[catlist]短代码在帖子或页面中按类别列出帖子,当编辑页面或帖子时,直接在“Text”中插入短代码,帖子将在那里列出。 | ||
+ | * {{: | ||
+ | * 基本用法是这样的: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * 要显示每个帖子的摘录使用:[catlist excerpt = yes] | ||
+ | * 列出“Dogs”类别的帖子:[catlist name = Dogs] | ||
+ | * 更多参数请参考:https:// | ||
+ | |||