
內容簡介
**總結:**
Scheduled Posts Showcase是一個WordPress外掛,可以在前端展示未來計劃發佈的文章,避免產生指向未發佈內容的問題連結,同時不會產生404錯誤。
**問題與答案:**
1. Scheduled Posts Showcase的主要功能是什麼?
- 可以在WordPress網站的前端展示預計發佈的文章,而不會造成指向未發佈內容的問題連結。
2. 這個外掛和其他解決方案的不同之處在哪裡?
- 不同於其他解決方案會連結到預定發佈的文章並導致訪問者產生404錯誤,這個外掛可以在不公開永久鏈接或文章ID的情況下展示文章信息。
3. Scheduled Posts Showcase的關鍵特性有哪些?
- 不會產生404錯誤; 多種展示方法; 可完全自定義; 全局設置和個別覆蓋; 可以本地化; 開發者友好。
4. 這個外掛提供了哪些展示選項?
- 文章展示數量;特色圖片(縮略圖或中等大小);預計發佈日期;文章摘要(可設置字數);分類;可選擇HTML標題的自定義標題;用於呼喚行動的自定義頁腳內容。
5. 如何控制文章的可見性?
- 可以選擇觀看你的預定文章的人群:所有人(公開);僅登錄用戶;僅編輯和管理員。
6. Scheduled Posts Showcase使用哪些簡碼來展示文章?
- [scheduled-posts-showcase]
7. 如何將Scheduled Posts Showcase小工具添加到網站?
- 從外觀→小工具中的任何小工具區域將“Scheduled Posts Showcase”小工具添加到其中。
8. Gutenberg Block用於什麼?
- 在區塊插入器中搜索“Scheduled Posts”,然後將區塊添加到任何文章或頁面。
9. REST API可用於什麼?
- 獲取 /wp-json/scheduled-posts-showcase/v1/scheduled-posts
- 可用參數:per_page, fields, post_type, order
10. 這個外掛為什麼值得使用?
- 其他用於顯示預定文章的外掛可能已被放棄,而Scheduled Posts Showcase提供先進且可靠的功能。
外掛標籤
開發者團隊
原文外掛簡介
Scheduled Posts Showcase lets you display your scheduled (future) posts on the frontend of your WordPress site without creating problematic links to unpublished content.
Unlike other solutions that link to scheduled posts and generate 404 errors for visitors, this plugin shows post information (title, date, excerpt, featured image, categories) without ever exposing the permalink or post ID.
Key Features
No 404 errors – Never generates links to unpublished content
Multiple display methods – Use shortcode, widget, Gutenberg block, or REST API
Fully customizable – Control what information to display and how it looks
Global settings with per-instance overrides – Set defaults once, customize where needed
Translation ready – Fully prepared for localization
Developer friendly – Extensive hooks for customization
Display Options
Number of posts to show
Featured image (thumbnail or medium size)
Scheduled publication date
Post excerpt (with configurable word count)
Categories
Custom heading with selectable HTML tag
Custom footer content for calls to action
Appearance Options
Card or minimal container style
Dashicon, theme default, or no list bullets
Curated icon selector for list bullets
Accent color customization
Responsive design
Visibility Control
Choose who can see your scheduled posts:
Everyone (public)
Logged-in users only
Editors and administrators only
Usage
Shortcode:
[scheduled-posts-showcase]
With parameters:
[scheduled-posts-showcase count="3" show_date="1" show_excerpt="1" container_style="card"]
Widget:
Add the “Scheduled Posts Showcase” widget to any widget area from Appearance → Widgets.
Gutenberg Block:
Search for “Scheduled Posts” in the block inserter and add the block to any post or page.
REST API:
GET /wp-json/scheduled-posts-showcase/v1/scheduled-posts
Parameters: per_page, fields, post_type, order
Why This Plugin?
Existing plugins for displaying scheduled posts either:
Are abandoned (some over 10 years old)
Link to scheduled posts, causing 404 errors
Use deprecated WordPress functions
Lack modern features like Gutenberg blocks
Scheduled Posts Showcase solves all these problems with a modern, secure, and fully-featured solution.
CSS Customization
The plugin provides semantic CSS classes for easy customization.
Available CSS Classes
.sps-scheduled-posts – Main container
.sps-style-card – Card style container
.sps-style-minimal – Minimal style container
.sps-scheduled-heading – Heading element
.sps-scheduled-list – Posts list (ul)
.sps-list-dashicon – List with dashicon bullets
.sps-list-theme – List with theme default bullets
.sps-list-none – List with no bullets
.sps-scheduled-item – Each post item (li)
.sps-scheduled-icon – Dashicon bullet
.sps-scheduled-thumbnail – Featured image container
.sps-scheduled-title – Post title
.sps-scheduled-date – Scheduled date
.sps-scheduled-excerpt – Post excerpt
.sps-scheduled-categories – Categories list
.sps-scheduled-footer – Custom footer content
.sps-no-scheduled – Empty state message
Example Customizations
/* Change font size for post titles */
.sps-scheduled-title {
font-size: 1.1em;
}
/* Add more padding to the card container */
.sps-style-card {
padding: 1.5em;
}
/* Custom color for the date */
.sps-scheduled-date {
color: #666;
font-style: italic;
}
CSS Custom Property
The accent color is available as a CSS custom property:
/* Use the accent color in your custom styles */
.my-custom-element {
border-color: var(--sps-accent-color);
}
Developer Hooks
The plugin provides filters and actions for developers to customize behavior without modifying plugin code.
Filters with Examples
spscase_query_args
Modify WP_Query arguments before fetching scheduled posts.
add_filter( 'spscase_query_args', function( $args ) {
// Only show posts from specific category
$args['cat'] = 5;
return $args;
} );
spscase_post_data
Modify the data array for each post before rendering.
add_filter( 'spscase_post_data', function( $post_data, $post ) {
// Add custom field to post data
$post_data['reading_time'] = get_post_meta( $post->ID, 'reading_time', true );
return $post_data;
}, 10, 2 );
spscase_post_html
Modify the HTML output for each individual post item.
add_filter( 'spscase_post_html', function( $html, $post_data ) {
// Add reading time after the title
if ( ! empty( $post_data['reading_time'] ) ) {
$badge = '' . esc_html( $post_data['reading_time'] ) . ' min read';
$html = str_replace( '', '' . $badge, $html );
}
return $html;
}, 10, 2 );
spscase_output_html
Modify the complete rendered HTML output.
add_filter( 'spscase_output_html', function( $html, $posts, $settings ) {
// Wrap output in custom container
return '
';
}, 10, 3 );
spscase_rest_post_data
Modify post data in REST API responses.
add_filter( 'spscase_rest_post_data', function( $post_data, $post ) {
// Add author name to API response
$post_data['author'] = get_the_author_meta( 'display_name', $post->post_author );
return $post_data;
}, 10, 2 );
spscase_excerpt_length
Override the excerpt word count.
add_filter( 'spscase_excerpt_length', function( $length ) {
// Shorter excerpts for sidebar widgets
return 15;
} );
spscase_date_format
Override the date format (default: WordPress date_format option).
add_filter( 'spscase_date_format', function( $format ) {
// Show relative dates like "in 3 days"
return 'relative';
} );
spscase_post_types
Filter available post types in the settings dropdown.
add_filter( 'spscase_post_types', function( $post_types ) {
// Remove 'page' from available post types
unset( $post_types['page'] );
return $post_types;
} );
spscase_cache_expiration
Modify cache duration in seconds (default: 3600 = 1 hour).
add_filter( 'spscase_cache_expiration', function( $seconds ) {
// Cache for 6 hours on high-traffic sites
return 6 * HOUR_IN_SECONDS;
} );
spscase_allowed_footer_html
Modify allowed HTML tags for footer content.
add_filter( 'spscase_allowed_footer_html', function( $allowed_tags ) {
// Allow button element in footer
$allowed_tags['button'] = array(
'class' => true,
'type' => true,
);
return $allowed_tags;
} );
Actions with Examples
spscase_before_output
Fires before the scheduled posts list renders.
add_action( 'spscase_before_output', function( $posts, $settings ) {
// Track impressions
if ( function_exists( 'my_track_impression' ) ) {
my_track_impression( 'scheduled_posts_widget' );
}
}, 10, 2 );
spscase_after_output
Fires after the scheduled posts list renders.
add_action( 'spscase_after_output', function( $posts, $settings ) {
// Output additional content after the list
echo '
Updated hourly
';
}, 10, 2 );
Support
Need help or have suggestions?
Official website
WordPress support forum
YouTube channel
Documentation and tutorials
Love the plugin? Please leave us a 5-star review and help spread the word!
About AyudaWP.com
We are specialists in WordPress security, SEO, and performance optimization plugins. We create tools that solve real problems for WordPress site owners while maintaining the highest coding standards and accessibility requirements.
