# Scheduled Posts Dashboard Widget

> Adds a Dashboard widget that lists the next ten scheduled posts of any type with their publish dates and edit links.

- Type: PHP
- Runs: Admin only
- Category: [Dashboard](https://wpide.com/library/category/dashboard/)
- Tags: dashboard, scheduled, editorial
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/scheduled-posts-dashboard-widget/

## Code

```php
add_action( 'wp_dashboard_setup', function () {
    if ( ! current_user_can( 'edit_posts' ) ) {
        return;
    }

    wp_add_dashboard_widget( 'wpide_scheduled_posts', 'Scheduled Content', function () {
        $posts = get_posts( array(
            'post_type'   => 'any',
            'post_status' => 'future',
            'numberposts' => 10,
            'orderby'     => 'date',
            'order'       => 'ASC',
        ) );

        if ( ! $posts ) {
            echo '<p>Nothing is scheduled right now.</p>';
            return;
        }

        echo '<ul>';
        foreach ( $posts as $post ) {
            $title = get_the_title( $post );
            printf(
                '<li><a href="%1$s">%2$s</a> &ndash; %3$s</li>',
                esc_url( (string) get_edit_post_link( $post->ID ) ),
                esc_html( '' !== $title ? $title : '(no title)' ),
                esc_html( get_the_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $post ) )
            );
        }
        echo '</ul>';
    } );
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Scheduled Posts Dashboard Widget" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
