{"id":53812,"date":"2011-07-13T08:00:00","date_gmt":"2011-07-13T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/display-posts-shortcode\/"},"modified":"2024-10-15T00:53:00","modified_gmt":"2024-10-15T00:53:00","slug":"display-posts-shortcode","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/display-posts-shortcode\/","title":{"rendered":"Display Posts \u2013 Easy lists, grids, navigation, and more"},"content":{"rendered":"<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<pre><code>[display-posts]\n<\/code><\/pre>\n<p><strong>Filter by Category<\/strong><\/p>\n<p>To only show posts within a certain category, use the category parameter:<\/p>\n<pre><code>[display-posts category=\"news\"]\n<\/code><\/pre>\n<p><strong>Display as Post Grid<\/strong><\/p>\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\/\" rel=\"nofollow ugc\">Here\u2019s how!<\/a><\/p>\n<p><strong>List Popular Posts<\/strong><br \/>\nYou can highlight your popular content in multiple ways. If you want to feature the posts with the most comments, use:<\/p>\n<pre><code>[display-posts orderby=\"comment_count\"]\n<\/code><\/pre>\n<p>You can also list <a href=\"https:\/\/displayposts.com\/2019\/01\/04\/most-popular-posts-by-social-shares\/\" rel=\"nofollow ugc\">most popular posts by social shares<\/a>.<\/p>\n<p><strong>Include thumbnails, excerpts, and more<\/strong><br \/>\nThe <a href=\"https:\/\/displayposts.com\/docs\/parameters\/#display-parameters\" rel=\"nofollow ugc\">display parameters<\/a> let you control what information is displayed for each post. To include an image and summary, use:<\/p>\n<pre><code>[display-posts include_excerpt=\"true\" image_size=\"thumbnail\"]\n<\/code><\/pre>\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<p><strong>Sort the list however you like<\/strong><br \/>\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<p><strong>List upcoming events<\/strong><br \/>\nYou can easily list upcoming events from any event calendar. Each plugin will require slightly different code.<\/p>\n<p>Here are <a href=\"https:\/\/displayposts.com\/tag\/events\/\" rel=\"nofollow ugc\">tutorials for popular event calendar plugins<\/a>. If your plugin is not listed here, submit a support request and I\u2019ll add it!<\/p>\n<p><strong>Tutorials<\/strong><br \/>\n<a href=\"https:\/\/displayposts.com\/tutorials\/\" rel=\"nofollow ugc\">Our tutorials<\/a> cover common customization requests, and are updated often.<\/p>\n<p><strong>Full Documentation<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/displayposts.com\/docs\/parameters\/#query-parameters\" rel=\"nofollow ugc\">Query parameters<\/a> for customizing which posts are listed (filter by category, tag, date\u2026)<\/li>\n<li><a href=\"https:\/\/displayposts.com\/docs\/parameters\/#display-parameters\" rel=\"nofollow ugc\">Display parameters<\/a> determine how the posts appear (title, excerpt, image\u2026)<\/li>\n<li><a href=\"https:\/\/displayposts.com\/2019\/01\/04\/use-template-parts-to-match-your-themes-styling\/\" rel=\"nofollow ugc\">Template parts<\/a> for Display Posts to perfectly match your theme\u2019s post listings<\/li>\n<li><a href=\"https:\/\/displayposts.com\/docs\/the-output-filter\/\" rel=\"nofollow ugc\">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\" rel=\"nofollow ugc\">Filters<\/a> for even more powerful customizations for developers<\/li>\n<\/ul>\n<p><strong>Extensions<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/billerickson\/Display-Posts-Pagination\" rel=\"nofollow ugc\">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\/\" rel=\"ugc\">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\" rel=\"nofollow ugc\">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\" rel=\"nofollow ugc\">Display Posts \u2013 Transient Cache<\/a> \u2013 Cache the output using transients<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/dps-coauthor-addon\" rel=\"nofollow ugc\">Co-Authors Plus Addon<\/a> \u2013 multiple authors on posts<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/dps-columns-extension\" rel=\"nofollow ugc\">Columns Extension<\/a> \u2013 display posts in columns<\/li>\n<li><a href=\"https:\/\/github.com\/billerickson\/DPS-Exclude-Sticky\" rel=\"nofollow ugc\">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\" rel=\"nofollow ugc\">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\" rel=\"nofollow ugc\">Display Posts Shortcode Remote<\/a> \u2013 display posts from a remote WordPress site utilizing the WP REST API.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Add a listing of content on your website using a simple shortcode. Filter the results by category, author, and more.<\/p>\n","protected":false},"author":65,"featured_media":265154,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Display Posts \u2013 Easy lists, grids, navigation, and more - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Add a listing of content on your website using a simple shortcode. Filter the results by category, author, and more."},"footnotes":""},"categories":[1],"tags":[199,581,542,1361,345],"class_list":["post-53812","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-page","tag-pages","tag-posts","tag-query","tag-shortcode"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/53812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=53812"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/53812\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/265154"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=53812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=53812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=53812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}