wp-utf8-excerpt-wordpress 顯示摘要

來源:互聯網
上載者:User
Main features of the plugin:
  1. It supports multibyte language (such as Chinese). It will not produce gibberish as some other excerpt plugins do.
  2. The html tags in the original posts, i.e., the font styles, colors, hyperlinks, pictures and such are preserved in the excerpt.
  3. For better readability, it displays 300 characters for each post on the homepage and 150 characters for each post on archive pages.

主要特點: 1,支援多位元組語言(如中文),不會產生亂碼。 2,摘要可保留文章中的格式標籤,如字型、顏色、連結、圖片等(需保留的標籤可在後台設定)。 3,首頁每篇文章顯示300字,存檔頁面每篇文章顯示150字(字數可設定)。

Installation
  1. Unzip and upload the wp-utf8-excerpt directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. In your theme directory, edit the index.php file by changing

    <?php the_content(); ?>

to

    <?php        if (is_single() or is_page()) {            the_content();        } else {            the_excerpt();        }     ?>

安裝: 1,解壓到/wp-content/plugins/目錄 2,在外掛程式頁面啟用外掛程式 3,修改主題的index.php檔案,把

    <?php the_content(); ?>

改成

    <?php        if (is_single() or is_page()) {            the_content();        } else {            the_excerpt();        }     ?>

注意:有些主題在the_content()中還有一些字,比如the_content(’Continue Reading »’),這種要把整句話換掉。有些主題用了其他檔案來控制存檔頁面,如category.php、archive.php等,如有必要,請對這些檔案也做修改。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.