The image_size parameter allows you to include an image in your Display Posts listing of any size you like. Here’s the description from the documentation: image_sizeSpecify an image size for displaying the featured image, if the post has one. The image_size can be set to thumbnail, medium, large (all controlled from Settings > Media), or […]
Display Posts includes many display parameters for customizing what is displayed in the post listing output. You can include things like the post title, image, excerpt, content, date, author, categories, and more. You can use the output filter to both modify existing pieces of the output (ex: default image) and add your own custom pieces […]
You can display the author name in the listings using Display image from post content if no featured image by Bill EricksonAdd extra text after title by Bill EricksonUse the WordPress date format by Bill EricksonAdd Post ID class to each listing item by Bill EricksonAdd class to current post for styling by Bill EricksonDisplay […]
On Dog Food Advisor we use Display Posts to dynamically list the best dog foods based on different criteria. In some areas we wanted to display these results as a table: The code below updates the listing to a table when the layout=”editors-choice” parameter is set. Shortcode Code
Display Posts has a few simple layouts built-in using the wrapper parameter: wrapper=”ul” creates a bulleted list (default display) wrapper=”ol” creates a numbered list wrapper=”div” creates a listing with no list But none of these options include headings, and they combine everything into a single line of text. Heading Block layout The code below adds […]
Display Posts includes many Display Parameters for customizing what is shown for each post in the list. It does not include an option for listing the comment count, but you can add one yourself using the Output Filter. Once the code below has been added to your site, you can include the comments link like […]
The links in Display Posts all open in the current window. We can use the output filter to modify this, making all links open in a new window:
If a user is logged in and has permission to edit/delete an article, this snippet will add a “Delete Post” link at the end of the listing for them to do so.
Display Posts lets you easily display posts based on any criteria you choose without any coding. It can be difficult to match your theme’s design for post summaries using just the shortcode and CSS. That’s where template parts come in. Styling belongs in a theme Your theme already contains the markup and styling for displaying posts. […]
If you include the image_size parameter, Display Posts will add an image below the post title. The snippet below lets you make the image appear before the post title instead.