{"id":487,"date":"2011-07-13T20:00:07","date_gmt":"2011-07-13T20:00:07","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/display-posts-shortcode\/"},"modified":"2024-10-14T16:53:48","modified_gmt":"2024-10-14T16:53:48","slug":"display-posts-shortcode","status":"publish","type":"plugin","link":"https:\/\/roh.wordpress.org\/plugins\/display-posts-shortcode\/","author":903215,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.0.3","stable_tag":"3.0.3","tested":"6.6.5","requires":"3.0","requires_php":"","requires_plugins":null,"header_name":"Display Posts","header_author":"Bill Erickson","header_description":"","assets_banners_color":"f7e0d8","last_updated":"2024-10-14 16:53:48","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/displayposts.com","header_author_uri":"https:\/\/www.billerickson.net","rating":4.8,"author_block_rating":0,"active_installs":80000,"downloads":1255941,"num_ratings":164,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.7":{"tag":"1.7","author":"billerickson","date":"2011-12-23 14:14:27"},"1.8":{"tag":"1.8","author":"billerickson","date":"2012-07-04 16:31:48"},"1.9":{"tag":"1.9","author":"billerickson","date":"2012-08-15 15:25:29"},"2.0":{"tag":"2.0","author":"billerickson","date":"2012-09-29 14:54:26"},"2.1":{"tag":"2.1","author":"billerickson","date":"2012-10-08 21:00:14"},"2.2":{"tag":"2.2","author":"billerickson","date":"2012-10-25 22:02:03"},"2.3":{"tag":"2.3","author":"billerickson","date":"2012-12-22 04:02:50"},"2.4":{"tag":"2.4","author":"billerickson","date":"2014-08-28 20:29:57"},"2.5":{"tag":"2.5","author":"billerickson","date":"2015-08-18 19:00:32"},"2.5.1":{"tag":"2.5.1","author":"billerickson","date":"2015-08-18 20:22:14"},"2.6.0":{"tag":"2.6.0","author":"billerickson","date":"2016-05-18 13:45:35"},"2.6.1":{"tag":"2.6.1","author":"billerickson","date":"2016-05-18 14:57:38"},"2.6.2":{"tag":"2.6.2","author":"billerickson","date":"2016-06-14 15:31:40"},"2.7.0":{"tag":"2.7.0","author":"billerickson","date":"2016-08-01 13:34:41"},"2.8.0":{"tag":"2.8.0","author":"billerickson","date":"2017-04-11 20:48:21"},"2.9.0":{"tag":"2.9.0","author":"billerickson","date":"2019-01-05 01:09:13"},"3.0.0":{"tag":"3.0.0","author":"billerickson","date":"2019-01-07 13:40:14"},"3.0.1":{"tag":"3.0.1","author":"billerickson","date":"2019-05-14 00:54:32"},"3.0.2":{"tag":"3.0.2","author":"billerickson","date":"2024-06-03 13:50:02"},"3.0.3":{"tag":"3.0.3","author":"billerickson","date":"2024-10-14 16:53:48"}},"upgrade_notice":[],"ratings":{"1":1,"2":2,"3":3,"4":9,"5":149},"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":2940963,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":2940963,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":2940963,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":2940963,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.7","1.8","1.9","2.0","2.1","2.2","2.3","2.4","2.5","2.5.1","2.6.0","2.6.1","2.6.2","2.7.0","2.8.0","2.9.0","3.0.0","3.0.1","3.0.2","3.0.3"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[170,243,166,1626,80],"plugin_category":[43],"plugin_contributors":[78145],"plugin_business_model":[],"class_list":["post-487","plugin","type-plugin","status-publish","hentry","plugin_tags-page","plugin_tags-pages","plugin_tags-posts","plugin_tags-query","plugin_tags-shortcode","plugin_category-customization","plugin_contributors-billerickson","plugin_committers-billerickson"],"banners":{"banner":"https:\/\/ps.w.org\/display-posts-shortcode\/assets\/banner-772x250.jpg?rev=2940963","banner_2x":"https:\/\/ps.w.org\/display-posts-shortcode\/assets\/banner-1544x500.jpg?rev=2940963","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/display-posts-shortcode\/assets\/icon-128x128.jpg?rev=2940963","icon_2x":"https:\/\/ps.w.org\/display-posts-shortcode\/assets\/icon-256x256.jpg?rev=2940963","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Display Posts allows you easily list content from all across your website. Start by adding this shortcode in the content editor to display a list of your most recent posts:<\/p>\n\n<pre><code>[display-posts]\n<\/code><\/pre>\n\n<p><strong>Filter by Category<\/strong><\/p>\n\n<p>To only show posts within a certain category, use the category parameter:<\/p>\n\n<pre><code>[display-posts category=\"news\"]\n<\/code><\/pre>\n\n<p><strong>Display as Post Grid<\/strong><\/p>\n\n<p>You can create a great looking, column-based grid of posts with a bit of styling. <a href=\"https:\/\/displayposts.com\/2019\/01\/04\/post-grid-styling\/\">Here's how!<\/a><\/p>\n\n<p><strong>List Popular Posts<\/strong>\nYou can highlight your popular content in multiple ways. If you want to feature the posts with the most comments, use:<\/p>\n\n<pre><code>[display-posts orderby=\"comment_count\"]\n<\/code><\/pre>\n\n<p>You can also list <a href=\"https:\/\/displayposts.com\/2019\/01\/04\/most-popular-posts-by-social-shares\/\">most popular posts by social shares<\/a>.<\/p>\n\n<p><strong>Include thumbnails, excerpts, and more<\/strong>\nThe <a href=\"https:\/\/displayposts.com\/docs\/parameters\/#display-parameters\">display parameters<\/a> let you control what information is displayed for each post. To include an image and summary, use:<\/p>\n\n<pre><code>[display-posts include_excerpt=\"true\" image_size=\"thumbnail\"]\n<\/code><\/pre>\n\n<p>You can use any image size added by WordPress (thumbnail, medium, medium_large, large) OR any custom image size added by your theme or other plugins.<\/p>\n\n<p><strong>Sort the list however you like<\/strong>\nBy default the listing will list the newest content first, but you can order by title, menu order, relevance, content type, metadata, and more.<\/p>\n\n<p><strong>List upcoming events<\/strong>\nYou can easily list upcoming events from any event calendar. Each plugin will require slightly different code.<\/p>\n\n<p>Here are <a href=\"https:\/\/displayposts.com\/tag\/events\/\">tutorials for popular event calendar plugins<\/a>. If your plugin is not listed here, submit a support request and I'll add it!<\/p>\n\n<p><strong>Tutorials<\/strong>\n<a href=\"https:\/\/displayposts.com\/tutorials\/\">Our tutorials<\/a> cover common customization requests, and are updated often.<\/p>\n\n<p><strong>Full Documentation<\/strong><\/p>\n\n<ul>\n<li><a href=\"https:\/\/displayposts.com\/docs\/parameters\/#query-parameters\">Query parameters<\/a> for customizing which posts are listed (filter by category, tag, date...)<\/li>\n<li><a href=\"https:\/\/displayposts.com\/docs\/parameters\/#display-parameters\">Display parameters<\/a> determine how the posts appear (title, excerpt, image...)<\/li>\n<li><a href=\"https:\/\/displayposts.com\/2019\/01\/04\/use-template-parts-to-match-your-themes-styling\/\">Template parts<\/a> for Display Posts to perfectly match your theme's post listings<\/li>\n<li><a href=\"https:\/\/displayposts.com\/docs\/the-output-filter\/\">Output filter<\/a> for complete control over how the listing looks on your site<\/li>\n<li><a href=\"https:\/\/displayposts.com\/docs\/parameters\/#display-parameters\">Filters<\/a> for even more powerful customizations for developers<\/li>\n<\/ul>\n\n<p><strong>Extensions<\/strong><\/p>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/billerickson\/Display-Posts-Pagination\">Display Posts \u2013 Pagination<\/a> \u2013 Allow results of Display Posts to be paginated<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/display-posts-date-view\/\">Display Posts \u2013 Date View<\/a> \u2013 Lets you break your content down by month or year.<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/Display-Posts-Alpha-View\">Display Posts \u2013 Alpha View<\/a> \u2013 Display an alphabetical listing of your content, broken down by letter<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/Display-Posts-Transient-Cache\">Display Posts \u2013 Transient Cache<\/a> \u2013 Cache the output using transients<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/dps-coauthor-addon\">Co-Authors Plus Addon<\/a> \u2013 multiple authors on posts<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/dps-columns-extension\">Columns Extension<\/a> \u2013 display posts in columns<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/DPS-Exclude-Sticky\">DPS Exclude Sticky<\/a> \u2013 exclude sticky posts unless specifically requested<\/li>\n<li><a href=\"https:\/\/github.com\/shazahm1\/Display-Posts-Shortcode-Pinch-Zoomer\">DPS Pinch Zoomer<\/a> \u2013 adds support pinch zooming post images on mobile devices and mouse wheel zooming on desktops<\/li>\n<li><a href=\"https:\/\/github.com\/shazahm1\/Display-Posts-Shortcode-Remote\">Display Posts Shortcode Remote<\/a> \u2013 display posts from a remote WordPress site utilizing the WP REST API.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>display-posts-shortcode<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the <em>Plugins<\/em> menu in WordPress.<\/li>\n<li>Add the <code>[display-posts]<\/code> shortcode to a post or page.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<p><strong>Version 3.0.3<\/strong>\n* Bumped the \"Tested To\" number to WP 6.6\n* Updated text of the plugin notice<\/p>\n\n<p><strong>Version 3.0.2<\/strong>\n* Added <code>pre_display_posts_shortcode_output<\/code> filter before shortcode runs, used for transient caching, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/214\">#210<\/a>\n* Updated plugin to pass coding standards, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/214\">#214<\/a>\n* Removed survey admin notice, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/213\">#213<\/a>\n* Don't display empty term list, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/208\">#208<\/a><\/p>\n\n<p><strong>Version 3.0.1<\/strong>\n* Prevent empty empty parameters from being added to the query, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/207\">#207<\/a><\/p>\n\n<p><strong>Version 3.0.0<\/strong>\n* Added author_id parameter, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/195\">#195<\/a>\n* Added has_password parameter\n* Added s parameter for performing a site search, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/184\">#184<\/a>\n* Added date_format=\"relative\" format option (ex: 2 days ago), see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/194\">#194<\/a>\n* Added post_parent__in and post_parent__not_in parameters, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/193\">#193<\/a>\n* Added excerpt_dash=\"false\" option to disable dash in excerpt, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/204\">#204<\/a>\n* Added additional parameters to the <code>display_posts_shortcode_output<\/code> filter\n* Added additional parameters to the <code>display_posts_shortcode_category_display<\/code> filter, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/185\">#185<\/a>\n* $dps_listing loop now accessible globally, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/198\">#198<\/a>\n* $dps_listing loop now accessible in open\/close filters\n* Added .excerpt-more class to excerpt more text, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/205\">#205<\/a>\n* Now excerpt_more text is always appended to end of excerpt, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/197\">#197<\/a>\n* In parameters that support multiple terms, they can now be separated with a comma or comma-space, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/183\">#183<\/a><\/p>\n\n<p><strong>Version 2.9.0<\/strong>\n* New parameter <code>exclude<\/code> for excluding specific post IDs, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/154\">#154<\/a>\n* New parameter <code>category_id<\/code> for specifying category by ID (note: only accepts a single ID), see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/156\">#156<\/a>\n* New parameter <code>include_date_modified<\/code> for displaying the date the post was last updated, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/150\">#150<\/a>\n* Shortcode title now appears above the wrapper (ul\/ol\/div), fixing invalid markup, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/165\">#165<\/a>\n* Limit visibility to readable posts<\/p>\n\n<p><strong>Version 2.8.0<\/strong>\n* Added include_link=\"false\" to remove link from post title and image, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/pull\/137\">#137<\/a>\n* Fixed category display when using multiple post types, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/143\">#143<\/a>\n* Fixed issue combining multiple taxonomies, see <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/131\">#131<\/a><\/p>\n\n<p><strong>Version 2.7.0<\/strong>\n* Added support for <a href=\"https:\/\/github.com\/billerickson\/dps-coauthor-addon\">Co-Authors Plus Addon<\/a>.\n* Added parameter to exclude children terms in tax queries, <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/120\">more information<\/a>\n* Added a filter to display the full version of manual excerpt, regardless of excerpt_length. <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/123\">more information<\/a>\n* Removed shortcodes from custom excerpts, <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/113\">more information<\/a>\n* Fixed private post visibility, <a href=\"https:\/\/github.com\/billerickson\/display-posts-shortcode\/issues\/115\">more information<\/a><\/p>\n\n<p><strong>Version 2.6.2<\/strong>\n* More improvements to excerpts, see #110\n* Added content_class parameter\n* Fix date query bug, see #108\n* Fixed undefined variable notice if include_title=\"false\"<\/p>\n\n<p><strong>Version 2.6.1<\/strong>\n* Fix issue with manually specified excerpts<\/p>\n\n<p><strong>Version 2.6<\/strong><\/p>\n\n<ul>\n<li>Add support for author=\"current\"<\/li>\n<li>Add support for multiple wrapper classes<\/li>\n<li>Add support for excerpt_length parameter<\/li>\n<li>Add support for excerpt_more parameter<\/li>\n<\/ul>\n\n<p><strong>Version 2.5.1<\/strong><\/p>\n\n<ul>\n<li>Fix an issue with manually specified excerpts<\/li>\n<\/ul>\n\n<p><strong>Version 2.5<\/strong><\/p>\n\n<ul>\n<li>Add support for date queries<\/li>\n<li>Exclude child pages with post_parent=\"0\"<\/li>\n<li>Query by current taxonomy terms. Ex: [display-posts taxonomy=\"category\" tax_term=\"current\"]<\/li>\n<li>Display the post's categories with [display-posts category_display=\"true\"]<\/li>\n<li>Many more fixes. See GitHub for a full list of changes.<\/li>\n<\/ul>\n\n<p><strong>Version 2.4<\/strong><\/p>\n\n<ul>\n<li>Add 'include_author' parameter<\/li>\n<li>Add 'exclude_current' parameter for excluding the current post from the results<\/li>\n<li>If you display the full content of results, additional uses of the shortcode within those posts are now turned off<\/li>\n<li>Other minor improvements<\/li>\n<\/ul>\n\n<p><strong>Version 2.3<\/strong><\/p>\n\n<ul>\n<li>Include the shortcode attributes on wrapper filter<\/li>\n<li>Add 'no_posts_message' parameter to specify content displayed if no posts found<\/li>\n<li>Add filters to the title and permalink<\/li>\n<li>Limit private posts to logged in users<\/li>\n<li>Add support for excluding sticky posts<\/li>\n<li>Add support for ordering by meta_key<\/li>\n<\/ul>\n\n<p><strong>Version 2.2<\/strong><\/p>\n\n<ul>\n<li>Use original attributes for filters<\/li>\n<li>Add support for multiple taxonomy queries<\/li>\n<li>Add filter for post classes<\/li>\n<li>Add support for post content in the post loop<\/li>\n<\/ul>\n\n<p><strong>Version 2.1<\/strong><\/p>\n\n<ul>\n<li>Add support for post status<\/li>\n<li>Add support for post author<\/li>\n<li>Add support for post offset<\/li>\n<\/ul>\n\n<p><strong>Version 2.0<\/strong><\/p>\n\n<ul>\n<li>Explicitly declare arguments, props danielbachhuber<\/li>\n<li>Sanitize each shortcode attribute for security, props danielbachhuber<\/li>\n<\/ul>\n\n<p><strong>Version 1.9<\/strong><\/p>\n\n<ul>\n<li>Add 'date_format' parameter, so you can customize how dates are displayed<\/li>\n<li>Added a class of .excerpt-dash so CSS can be used to remove the dash<\/li>\n<li>Cleaned up the codebase according to WordPress coding standards<\/li>\n<\/ul>\n\n<p><strong>Version 1.8<\/strong><\/p>\n\n<ul>\n<li>Added <code>display_posts_shortcode_no_results<\/code> filter for displaying content if there's no posts matching current query.<\/li>\n<li>Add support for multiple post types. [display-posts post_type=\"page, post\"]<\/li>\n<\/ul>\n\n<p><strong>Version 1.7<\/strong><\/p>\n\n<ul>\n<li>Added <code>id<\/code> argument to specify specific post IDs<\/li>\n<li>Added <code>display_posts_shortcode_args<\/code> filter in case the arguments you want aren't already included in the shortcode. See example: http:\/\/www.billerickson.net\/code\/display-posts-shortcode-exclude-posts\/<\/li>\n<\/ul>\n\n<p><strong>Version 1.6<\/strong><\/p>\n\n<ul>\n<li>Added <code>post_parent<\/code> where you can specify a parent by ID, or you can say <code>post_parent=current<\/code> and it will use the current page's ID.<\/li>\n<li>Added <code>wrapper<\/code> where you can decide if the posts are an unordered list, ordered list, or div's<\/li>\n<li>Added support for multiple taxonomy terms (comma separated) and taxonomy operator (IN, NOT IN, or AND).<\/li>\n<\/ul>\n\n<p><strong>Version 1.5<\/strong>\n* For the sake of clarity I'm changing version numbers. No feature changes<\/p>\n\n<p><strong>Version 0.1.5<\/strong>\n* Added a filter (display_posts_shortcode_output) so you can modify the output of individual posts however you like.<\/p>\n\n<p><strong>Version 0.1.4<\/strong><\/p>\n\n<ul>\n<li>Added post_type, taxonomy, tax_term, and include_excerpt<\/li>\n<li>Added classes to each part of the listing (image, title, date, excerpt) to make it easier to change the look using CSS<\/li>\n<\/ul>\n\n<p><strong>Version 0.1.3<\/strong><\/p>\n\n<ul>\n<li>Updated Readme<\/li>\n<\/ul>\n\n<p><strong>Version 0.1.2<\/strong><\/p>\n\n<ul>\n<li>Added image_size option<\/li>\n<\/ul>\n\n<p><strong>Version 0.1.1<\/strong><\/p>\n\n<ul>\n<li>Fix spacing issue in plugin<\/li>\n<\/ul>\n\n<p><strong>Version 0.1<\/strong><\/p>\n\n<ul>\n<li>This is version 0.1.  Everything's new!<\/li>\n<\/ul>","raw_excerpt":"Add a listing of content on your website using a simple shortcode. Filter the results by category, author, and more.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=487"}],"author":[{"embeddable":true,"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/billerickson"}],"wp:attachment":[{"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=487"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=487"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=487"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=487"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=487"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/roh.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}