Because we often write long articles, We Need To paging the homepage for the sake of appearance, that is, only the specified part of content is displayed during the homepage preview, but unfortunately the index is fixed. php allows each article to display a fixed number of words. How can I set the number of words displayed in each article... the second is the homepage article list... because we often write long articles, We Need To paging the homepage for the sake of appearance, that is, only the specified part of content is displayed during the homepage preview, but unfortunately the index is fixed. php allows each article to display a fixed number of words. How can I set the number of words displayed in each article... the second is how to display the articles on the home page by page... because the number of articles is large.
Reply content:
Because we often write long articles, We Need To paging the homepage for the sake of appearance, that is, only the specified part of content is displayed during the homepage preview, but unfortunately the index is fixed. php allows each article to display a fixed number of words. How can I set the number of words displayed in each article... the second is how to display the articles on the home page by page... because the number of articles is large.
You can use custom fields, and then the home page displays the content you want to display with custom fields, see: http://docs.typecho.org/help/custom-fields
In addition, the homepage article should normally be paginated. You can set the number of articles displayed on each page in the background settings.
If you need some advanced paging features, such as 20 pages on the home page and 40 pages on the search page, you can consider modifying functions. php
For example, modify the default pageSize to 20.
Function themeInit ($ archive) {if ($ archive-> is ('index') {$ archive-> parameter-> pageSize = 20; // Number of custom entries }}
The function is to change the number of articles displayed on each page of the homepage from the default value to 20.
Reference: Skin functions of typecho