
內容簡介
雖然 WordPress 讓您可以將帖子設為置頂,甚至按升序或降序排序帖子,但有時這仍然不夠。如果您想按任何順序顯示帖子,該怎麼辦?不幸的是,WordPress 中沒有這樣的功能,這就是這個外掛的用途。
此外掛程序適用於文章節,您可以基於以下三點標準定義這些設施:
逐個選擇帖子:您可以使用拖放功能以任何順序重新排列帖子。
選擇類別:您還可以從任何類別中選擇帖子並更改它們的順序。
顯示 XML/RSS 資訊:只需提供 XML 資料源或 RSS 資料源的網址,它即會提取最新文章。
您可以使用 query_posts、get_posts 或 WP_Query 以以下方式顯示帶有順序的帖子:
query_posts(‘section_name=NAME_OF_SECTION’);
這裡,NAME_OF_SECTION 必須替換為您實際部分的名稱。 如果找不到所述名稱的部分,則不會更改任何內容。
或者
創建部分後,您可以使用小工具顯示這些帖子。
如果您在小工具中使用自訂模板選項,則模板文件應放置在插件的custom-templates文件夾中(/wp-content/plugins/my-posts-order/includes/custom-templates/loop.php和/wp-content/plugins/my-posts-order/includes/custom-templates/loop_rss.php)。
是不是很簡單!
外掛標籤
開發者團隊
原文外掛簡介
While WordPress allows you to make your posts sticky, or even sort them in ascending or descending order, sometimes this is just not enough. What if you want to display the posts in ANY order you need? Unfortunately there is no such functionality in WordPress, which is where this plugin saves the day.
This plugin works on sections of posts, which you can define based on the following three criteria:
Select posts individually : You can use the drag-and-drop feature to rearrange posts in ANY order.
Select a category : You can also select posts from any category and change the posts order.
Show XML/RSS Feed : Here you just need to give the URL of XML Feed and it will fetch latest feed/posts.
You can display ordered posts in theme with query_posts or get_posts or WP_Query like this :
query_posts(‘section_name=NAME_OF_SECTION’);
Here NAME_OF_SECTION must be replaced with your actual section name. If no section found with mentioned name then nothing will change.
OR
Once the sections are created, you can display these posts using widgets.
If you are using custom template option in widget then template file should be placed in custom-templates folder of your plugin (/wp-content/plugins/my-posts-order/includes/custom-templates/loop.php) and (/wp-content/plugins/my-posts-order/includes/custom-templates/loop_rss.php).
Now wasn’t that easy!
