Display Posts Shortcode

The Display Posts Shortcode allows users to easily display listings of posts.

If you are using the Block Editor the Query Loop Block will do much of this, in a more visual way.

Add the shortcode in a post or page, and use the arguments to select based on tag, category, post type, and many other possibilities.

There are also some extra options to display something more than just the title: include_date, include_excerpt, and image_size.

You can also display the list in a Text Widget. See Embed Codes in widgets for details and examples.

For example [display-posts category ="news" ] will give you this:

display-posts-plugin

This technique is extremely powerful but can get tricky if you are trying for more advanced methods. The display-posts-shortcode Wiki on GitHub gives more details.


More Examples

[display-posts post_type="page" post_parent="743"]

Will show pages whose parent has the id of 743. This is the plugin page on this site.

A way to find out the id of a page: In the Post or pages list, hover over the post title and the id is in the link shown in your status bar:

Screenshot explaining how to get the id of a page from the page list.

Here we include an excerpt and the date and limit the number of posts to three.

[display-posts category ="releases" include_excerpt="true" include_date="true" posts_per_page="3"]

  • Glow Blogs Release September 2025 (9/12/2025) - This release contains a couple of improvements and some general updated. The Ability to edit CSS has been restored. There is a new Contact Form Block for Block Themed sites.
  • Glow Blog Release 6 Aug 2025 (8/6/2025) - There was a new release on Glow Blogs today. Civic Cookie We have changed the way users can control cookies with the civic cookie plugin. This allows visitors and users to set the cookies they will accept from Glow Blogs. You can change this at any time by editing your cookie preferences. These are accessed … Continue reading Glow Blog Release 6 Aug 2025
  • Glow Blogs Update May 2025 (5/28/2025) - Glow Blogs was updated yesterday. The Following Plugins were updated. Jetpack, Syntax Highlighter, WP Accessibility, Mega Menu, H5P, Youtube Embed , 3D Flipbook, Userway Accessibility, WP Draw Attention. The Plugin updates in the main as small fixes and compatibility with the latest version of WordPress. Jetpack Fixed: A problem with the Jetpack icon not being … Continue reading Glow Blogs Update May 2025

And here we don’t have a list but put each post in a div.

[display-posts category="issues-news-2" include_excerpt="true" wrapper="div" posts_per_page="3"]

Widgets in New Site Issue & Workarounds - There is a problem with the display of widgets when editing them. This only happens with a classic theme on newly created sites. It does not affect older sites. When a new site is created it comes with a pre-installed set of widgets. This is theme dependent. When you go to edit the widgets in … Continue reading Widgets in New Site Issue & Workarounds
Glow Blogs Twitter Changes - Twitter/X keeps changing the goal posts for integration with other systems. Recently they have stripped out most of the functionality for free third party use.
Forms in the Block Editor - We have just added a lot more blocks to use in the Block Editor. Unfortunately the Forms are not working properly. The Developers are working on a fix. Workaround In the meantime the Jetpack Contact form still word as expected in the classic editor. If you switch to the classic editor for a post or … Continue reading Forms in the Block Editor

More Advanced Examples

We can cange the appearance by using some custom css. You can activate the editing of CSS in the Dashboard-> Settings -> General. More information on our CSS page.

[display-posts category="news" include_excerpt="true" excerpt_length="20" wrapper="div" posts_per_page="3" wrapper_class="examplecss"]

Glow Blogs Release September 2025 - This release contains a couple of improvements and some general updated. The Ability to edit CSS has been restored. There… Continue reading Glow Blogs Release September 2025
Glow Blogs Start of Session FAQ 2025 - A few quick tips and some information that might help at the start of this new session. Continue reading Glow Blogs Start of Session FAQ 2025
Glow Blog Release 6 Aug 2025 - There was a new release on Glow Blogs today. Civic Cookie We have changed the way users can control cookies… Continue reading Glow Blog Release 6 Aug 2025

CSS


/* for display posts shortcode page */
.page-id-1403 .examplecss .listing-item {
    width: 30%;
    float: left;
    padding: 3px;
}

.page-id-1403 .examplecss a.title {
    display: block;
    width: 100%;
    font-weight: bold;
    text-decoration: none;
    background: lightyellow;
    border: solid 1px #ccc;
}

.page-id-1403 .examplecss .excerpt-dash {
    display: none;
}


Featured Images

If your posts use featured images you can use them too. Here is an screenshot example from the Blogging Bootcamp #2 blog.

Sreenshot of a grid of images produced from featured images by the display posts plugin

This uses:

[display-posts category="announcement" wrapper="div" wrapper_class="ann-grid-layout" image_size="thumbnail" order="ASC"]

And this CSS:

.page-id-632 div.listing-item {
float: left;
width: 150px;
margin: 3px;
border: solid 1px #eee;
padding: 3px;
}

.page-id-632 .ann-grid-layout {
width: 500px;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Help for Glow Blogs

Report a Glow concern
Cookie policy  Privacy policy