Providing your readership with a list of scheduled posts is an effective means of cementing yourself in their minds. By giving them a sneak peak at your future content they are, anecdotally, more inclined to come back for more. This article will provide you with the necessary shortcode to render a list of scheduled posts. There are a few options that alter the way in which the information is presented.
This is a complete rewrite of a function that formerly resided on Internoetics (although it looks nothing like the old one). It's been rewritten to more closely align with WordPress best practice. Note: The little squares I've plastered on the screen are my own just to break up the page for readability.
For the first example, we'll print scheduled articles from all authors in all categories - ascending in date (most recent first). The shortcode of
[future will render the following list:
■ ■ ■
- Updated AI-Supported Website Comparison Engine on Your Website — July 23, 2200
■ ■ ■
If you're reading this at a point when there aren't any scheduled posts, the list will look as follows (the image link includes the excerpt text).
In the example above I've list all future scheduled posts. To limit the number to just the next three that are written by me I'll use
[future number="3" author="1" description="0" format="jS F Y, g:iA"]. I've enabled the short excerpt with
description="1", and I've altered the format in which the date will be returned. The
author="1" is my WordPress user ID. The result.
■ ■ ■
- Updated AI-Supported Website Comparison Engine on Your Website — 23rd July 2200, 4:00PM
… Download our 650-page guide on Finance Marketing. We'll show you exactly how we generate…
■ ■ ■
In the final examples we'll display the list in a narrow box to emulate what it might look like if styled in a sidebar.
The full list of attributes that'll alter the appearance of your list are detailed below.
Copy and paste the WordPress function into your theme's
functions.php file or, if you sensibly have one installed, your custom functions plugin. You may optionally download and install our plugin from the bottom of of the page.
id="1,2,5"). To remove authors, prefix their ID with a minus sign (
category="1,4,7"To exclude a category, prefix the category with a minus sign.
orderbylist is quite extensive and is listed on the WordPress codex website . The primary means of ordering is by
orderlist designates the ascending or descending order of the list. Either
descriptionapplies to excerpt. False by default, use
description="1"to display excerpt text.
description, you can
removecertain text (usually applies to tweet text and such that are injected into your post content).
wordsreturned in the excerpt. The teaser is 15 words by default... you don't want to give too much away.
numberof posts to return. Returns all scheduled articles by default.
- The function will return any post types (published, drafts, etc) but we'll publish additional shortcodes designed specifically for that purpose to avoid unnecessary complexity.
- More on WP Query here .