Posts. Posts. Posts. That’s what you write and publish in WordPress. They show up on your front page, newest first. Maybe you organize them into categories, which you can display… newest first.

But there’s a lot more you can do to use them in other ways with the Display Posts plugin, available to everyone’s sites hosted at the OpenETC. You can embed a listing of posts in page, a widget, even… inside another post! And you can use extra options to change which posts are selected, in what order they are listed (including my favorite, random) and how they are displayed (to show an excerpt, date published).

This is one plugin I use over and over.

I saw a possibility when Emily Schudel shared in our Mattermost Community (what, you are not in there? Join now) a fantastic project she has done for over a year for the Camosun College eLearning site. First, check out the Camosun Faculty Stories. They are a wonderful testimonial to the care and effort Camosun faculty put into adjusting their teaching to pandemic conditions.

Here you can find inspirational stories from faculty across Camosun College who bravely moved their courses from face to face to completely online, sometimes in a matter of a few weeks.

You will find a list of 22 Faculty stories Emily has collected and published as posts, and organized them as well into a Faculty Stories category. It is published as a WordPress Page, and I would guess that each time Emily publishes a new story, she has to update this page.

This is one place where Display Posts can make the list of stories dynamic, the page of Faculty Stories could be updated by itself when she published the next story in this category.

The first step is heading into your WordPress plugins, look for the one called Display Posts, and click the Activate link.

Nothing happens.

Yet.

This plugin is used in content via WordPress Shortcodes, they are things in brackets [.....] that are a placeholder for inserting content when published.

The basic use of the plugin is

[display-posts]

which would merely display a list of the 10 most recent posts. But it offers a wide range of extra options you can add to make it do something different.

To automate what is done in Emily’s manually edited lists of posts, I would use something like this shortcode – I know the options well but they are well documented:

[display-posts category="faculty-stories" order="ASC" posts_per_page="-1"]

This says to select posts only from the Faculty Stories category (using the part of URL used in displaying the category) https://camosunelearning.opened.ca/category/faculty-stories/ The ASC option for order flips the default action to list newest posts first, we want to list them in the order they were published. The posts_per_page value of –1 is a trick to have to display all posts (otherwise you only get only 10 posts).

If Emily wanted to include an excerpt from the post and a link to continue reading, this should work:

[display-posts category="faculty-stories" order="ASC" posts_per_page="-1" include_excerpt="true" excerpt_more="Read more..." excerpt_more_link="true"]

There are other ways Emily could put her posts to work. She could create a sidebar or footer text widget (or use in any page/post) with a Display Posts shortcode that displays 5 random stories.

[display-posts category="faculty-stories" orderby="rand" posts_per_page="5"]

Each time the page is viewed, it should list five random stories from the collection.

I find this plugin useful too on sites where I change the option on my site to use a WordPress for the home rather than just the newest posts — see Take Control of the Front of Your WordPress Site. I used this for the Stories of OpenETC in Action site to have a welcome message on the landing page. In the middle of this page, I use the Display Posts plugin to list 5 random stories:

[display-posts posts_per_page="5" orderby="rand"]

that generates a different set of 5 on every view:

Screenshot that shows a list of 5 different linked stories, on the right is the text of the shortcode listed above
See the randomness at https://openetc.opened.ca/

You can just have posts come up as WordPress gives them to you, or you can take over control and display them in many more different ways with the Display Posts plugin.

And if that’s not enough, wait until you see what is possible for Pages with the Page-List plugin.


Image Credit: Image by Daniel Hannah from Pixabay