
內容簡介
Flex Posts 是一款小工具,可在不同的佈局中顯示文章。它非常適合需要在頁面中顯示多篇文章的新聞網站。
此小工具支持響應式設計,因此您可以將其放置在任何小工具區域。內容將根據容器的寬度來進行適應。在標準側邊欄等狹窄區域中,文章將垂直顯示,但在更寬的區域中,文章將以2或3列顯示,具體取決於容器的寬度。
小工具設置
標題:設置小工具標題。如果要隱藏標題部分,請將其保留為空。
標題網址:設置標題鏈接網址。如果要禁用標題中的鏈接,請將其保留為空。
佈局:選擇從佈局1到4的小工具佈局。
文章類型:選擇文章類型。選項包括:文章、頁面、如果可用,則為自定義文章類型,以及任何。
分類:為文章選擇一個分類,或選擇“所有分類”以禁用此篩選器。
標籤:設置文章標籤(使用標籤別名)。您還可以使用逗號分隔的值來指定多個標籤。在標籤前加上連字符將排除符合該標籤的文章。例如,featured, -video 會顯示標記為featured 的文章,但不包括標記為video的文章。
排序方式:設置文章的顯示順序。選項包括:最新、最舊、最多評論、按字母順序、隨機排序、修改日期。
顯示的文章數量:設置要顯示的文章數量。
要跳過的文章數量:設置要排除或跳過的文章數量。
在哪些文章中顯示圖像:選擇在哪些文章中顯示圖像。選項包括:所有文章、僅第一篇文章或無圖像。
圖像大小:從已註冊的圖像大小中選擇圖像大小。
顯示文章標題:選擇顯示或隱藏文章標題。
顯示分類:選擇顯示或隱藏分類。
顯示作者:選擇顯示或隱藏作者。
顯示日期:選擇顯示或隱藏日期。
顯示評論數量:選擇顯示或隱藏評論數量。
顯示節錄:選擇顯示或隱藏節錄。
摘要長度:為摘要設置單詞數量。
顯示“閱讀更多”鏈接:選擇顯示或隱藏“閱讀更多”鏈接。
“閱讀更多”文本:設置“閱讀更多”鏈接的文本。您可以將其保留為空以使用默認文本Read More。
顯示分頁:選擇顯示或隱藏分頁鏈接。
附加類別:為小工具容器設置自定義類別。您可以使用空格來分隔多個類別。
Gutenberg 塊
自版本1.1.0以來,Flex Posts 還包括 gutenberg 塊。您可以使用 WP 5.0 塊編輯器將小工具直接添加到帖子/頁面內容中。
演示
請在此處查看實時演示:Flex Posts 演示
要求
此插件已經過測試,並且可以與環境中安裝了至少 PHP 5.3 的環境一起使用。但是,我們強烈建議您使用最新版本的 PHP,因為使用較舊版本可能會使您面臨安全漏洞。
外掛標籤
開發者團隊
② 後台搜尋「Flex Posts – Widget and Gutenberg Block」→ 直接安裝(推薦)
原文外掛簡介
Flex Posts is a widget to display posts in various different layouts. It is useful for a news site where you need to display a lot of posts in a page.
The widget is responsive so you can place it in any widget area. The widget content will adapt based on the width of its container. In a narrow area like standard sidebar, posts will be displayed vertically, but in a wider area, posts will be displayed in 2 or 3 columns depends on the container’s width.
Widget Settings
Title: Set the widget title. Leave it empty to hide the title section.
Title URL: Set the title link url. Leave it empty to disable link in the title.
Layout: Select a widget layout, from layout 1 to 4.
Post type: Select the post type. Options include: Post, Page, custom post types if available, and any.
Category: Select a category for the posts, or choose All Categories to disable this filter.
Tag(s): Set a post tag (using the tag slug). You can also use comma separated value for multiple tags. Prepending a tag with a hyphen will exclude posts matching that tag. Eg, featured, -video will show posts tagged with featured but not video.
Order by: Set the order in which the posts will be displayed. Options include: Newest, Oldest, Most Commented, Alphabetical, Random, Modified Date, Page order.
Number of posts to show: Set the number of posts displayed.
Number of posts to skip: Set the number of posts to displace or pass over.
Exclude current post: Choose to show or hide current post.
Show image on: Select in which posts the image will be displayed. Options include: All posts, First post only, or none.
Image size: Select image size from registered image sizes.
Show post title: Choose to show or hide the post title.
Show categories: Choose to show or hide the categories.
Show author: Choose to show or hide the author.
Show author image: Choose to show or hide the author image.
Show date: Choose to show or hide the date.
Show comments number: Choose to show or hide the comments number.
Show excerpt: Choose to show or hide the excerpt
Excerpt length: Set the number of words for the excerpt.
Show read more link: Choose to show or hide the Read More link.
Read more text: Set the text for the read more link. You can leave it empty to use the default text Read More.
Show pagination: Choose to show or hide the pagination links.
Block title HTML element: Choose the HTML element for the block title. Options include: h1, h2, h3, h4, h5, h6, div, p, span.
Post title HTML element: Choose the HTML element for the post title. Options include: h1, h2, h3, h4, h5, h6, div, p, span.
Additional class(es): Set a custom class for the widget container. You can use spaces to separate multiple classes.
Gutenberg Block
Since version 1.1.0, Flex Posts also includes a gutenberg block. You can add the widget directly into the post/page content with the WP 5.0 block editor.
Demo
Please visit the live demo here: Flex Posts Demo
Requirements
This plugin has been tested and works with at least PHP 5.3 installed in your environment. But we strongly recommend you to use the latest PHP version, as using older versions may expose you to security vulnerabilities.
