[WordPress] 外掛分享: Back to the Future

首頁外掛目錄 › Back to the Future
WordPress 外掛 Back to the Future 的封面圖片
20+
安裝啟用
★★★★★
5/5 分(1 則評價)
4072 天前
最後更新
問題解決
WordPress 1.5+ v1.0 上架:2015-02-04

內容簡介

在 single.php (單一文章範本) 上顯示未來/預定發佈的文章
使用短碼顯示未來/預定發佈的文章
啟用未來/預定發佈的文章評論

對於開發人員

在您的範本中,只需將字串 ‘post_status=future’ 添加到您的 WP_Query 裡面

例如:WP_Query(‘post_status=future’);

$args = array(
'post_type' => 'post_type',
'posts_per_page' => '-99',
'post_status' => array( 'publish', 'future' )
);

$loop = new WP_Query( $args );

while ( $loop->have_posts() ) : $loop->the_post();

詳細請閱讀 https://codex.wordpress.org/Class_Reference/WP_Query/

這會顯示所有未來和已發佈的文章。

授權

Back to the Future 是自由軟體:您可以在自由軟體基金會發布的 GNU 通用公共授權條款第3版或(按您的選擇)更高版本下重新分發和/或修改它。

Back to the Future 發布於希望它會有用,但是不提供任何形式的保證或擔保,包括市場適銷性或特定目的的適用性擔保。詳情請參閱 GNU 通用公共授權條款。

如果您沒有收到 GNU 通用公共授權條款的副本,請參閱 http://www.gnu.org/licenses/

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Back to the Future」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Displays future/scheduled posts on single.php(Single Post Template)
Displays future/scheduled posts using shortcode
Enables comments for future/scheduled posts

For Developers
On your template, just simply add the string ‘post_status=future’ to your WP_Query
Example: WP_Query(‘post_status=future’);
$args = array( 'post_type' => 'post_type',
'posts_per_page' => '-99',
'post_status' => array( 'publish', 'future' )
);

$loop = new WP_Query( $args );

while ( $loop->have_posts() ) : $loop->the_post();

Read More in https://codex.wordpress.org/Class_Reference/WP_Query/
This displays all future and published posts.
License
Back to the Future is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Back to the Future is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Back to the Future. If not, see http://www.gnu.org/licenses/.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon