Display Posts Shortcode

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

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:

The display-posts-shortcode Wiki on GitHub gives more details.


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

Will show pages whose parent has the id of 743

 

An easy way to find out the id of a page: In the page editor, click Get Shortlink, this will open a dialog with a link, the number at the end is the post id.

Screen Shot 2016-03-03 at 14.43.52


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 Update (3/16/2018) - Glow Blogs had a small update this week: WordPress – 4.9.2 > 4.9.4 event-organiser plugin – 3.6.2 > 3.6.3 google-language-translator plugin – 5.0.33 > 5.0.43 wordpress-importer plugin  – 0.6.3 > 0.6.4 These were small maintenance and bug fixes. They should not affect the majority of Glow users.
  • Glow Blogs Update WordPress 4.9.1 (12/7/2017) - We will be having and update of Glow Blogs this afternoon/evening. Work will start at 16:00 and service will be restored as soon as possible thereafter. Here is an overview of the update, we will be posting details of any changes to the help ASAP. Name Current Version Update Version WordPress 4.8.3 4.9.1 Plugins Event-organiser … Continue reading Glow Blogs Update WordPress 4.9.1
  • WordPress Update (9/28/2017) - Glow Blogs have been updated from WordPress 4.7 to 4.8.2 The main features in this update: New Widgets There are new Text, Image, Audio & Video widgets More details and examples. Improvements to adding links Adding and editing links is now a better process. See the Version 4.8 on WordPress Codex for more details.

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"]

Twitter Widget on Glow Blogs Change - Twitter has changed their API and no longer allow you to embed a twitter search on a webpage. This means the option to use a twitter search via a Widget ID in a blog widget will not work any more. The option to embed a profile will still work. There may be some blogs that … Continue reading Twitter Widget on Glow Blogs Change
Glow Blogs & Report a Concern – Connectivity Issues Work Completed. - Update 6 October 2017. Monitoring – Essential Maintenance was performed to the Blogs Service last night in an effort to resolve the performance issues. The service has stablised at present. We will continue to monitor closely. We are still having some problems, check Glow Scotland Status for details: Investigating – Unfortunately, efforts to implement a … Continue reading Glow Blogs & Report a Concern – Connectivity Issues Work Completed.
Blogs Outage Sunday 17th September between 15:00 – 16:00 - We have recently been experiencing performance issues on Glow Blogs around 3pm each day. It has been agreed to allow a one hour outage to the Blogs service on Sunday 17th September between 15:00 – 16:00. This will allow our technical teams to conduct further in-depth investigations. We understand this isn’t ideal but it is … Continue reading Blogs Outage Sunday 17th September between 15:00 – 16:00

We can use some custom css, this is added via the Jetpack Custom CSS module.

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

Twitter Widget on Glow Blogs Change - Twitter has changed their API and no longer allow you to embed a twitter search on a webpage. This means the option to use a twitter search via a Widget ID in a blog widget will not work any more. The option to embed a profile will still work. There may be some blogs that … Continue reading Twitter Widget on Glow Blogs Change
Glow Blogs & Report a Concern – Connectivity Issues Work Completed. - Update 6 October 2017. Monitoring – Essential Maintenance was performed to the Blogs Service last night in an effort to resolve the performance issues. The service has stablised at present. We will continue to monitor closely. We are still having some problems, check Glow Scotland Status for details: Investigating – Unfortunately, efforts to implement a … Continue reading Glow Blogs & Report a Concern – Connectivity Issues Work Completed.
Blogs Outage Sunday 17th September between 15:00 – 16:00 - We have recently been experiencing performance issues on Glow Blogs around 3pm each day. It has been agreed to allow a one hour outage to the Blogs service on Sunday 17th September between 15:00 – 16:00. This will allow our technical teams to conduct further in-depth investigations. We understand this isn’t ideal but it is … Continue reading Blogs Outage Sunday 17th September between 15:00 – 16:00

 


 


.page-id-388 .site-content .entry-header,
         .page-id-388 .site-content .entry-content,
         .page-id-388 .site-content .entry-summary,
         .page-id-388 .site-content .entry-meta,
         .page-id-388 .page-content {
    margin: 0 auto;
    max-width: 800px;
}

/* 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;
}

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

Screen Shot 2015-10-07 at 12.55.27

 

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

Glow Blogs uses cookies to enhance your experience on our service. By using this service or closing this message you consent to our use of those cookies. Please read our Cookie Policy.

Close