{"id":6,"date":"2025-02-01T18:52:34","date_gmt":"2025-02-01T23:52:34","guid":{"rendered":"https:\/\/www.golive.clarku.edu\/jp\/?page_id=6"},"modified":"2025-11-10T16:44:51","modified_gmt":"2025-11-10T21:44:51","slug":"dynamic-post-lists","status":"publish","type":"page","link":"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/","title":{"rendered":"Dynamic post lists"},"content":{"rendered":"\n<div class=\"wp-block-columns sidebar is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:45rem\">\n<p class=\"intro\">Show a list of recent news, upcoming events, topical research, or more.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Display posts from the current site<\/h2>\n\n\n\n<p>If you&#8217;d like to display a list of posts on your site, you can do that with a shortcode called Display Posts.  Display Posts lets you use a shortcode to do all of the hard work. The <a href=\"https:\/\/displayposts.com\/docs\/parameters\/\">shortcode has many parameters<\/a> that you can use to customize the display. A simple example that shows up to 10 announcements from the past two years would be:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;display-posts category=\"announcements\" image_size=\"thumbnail\" include_date=\"true\" date_format=\"F j, Y\" posts_per_page=\"10\" no_posts_message=\"No recent news to display\" date_query_after=\"2 years ago\"]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Display posts from another ClarkU site<\/h2>\n\n\n\n<p>Sometimes, you might want to display posts from another site.  For example, maybe you want to show a list of programs or courses.  For that we have a different shortcode that extends Display Posts.  It&#8217;s called Display Posts Multisite, and it works almost just like the regular Display Posts, but you have to identify the site you want to draw from using the blog_id parameter.  To display a list of 4+1 Accelerated Master&#8217;s Degrees, you&#8217;d do it like so:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;display-posts-multisite blog_id=\"2\" post_type=\"clarku_program\" posts_per_page=\"10\" order=\"asc\" orderby=\"title\" taxonomy=\"degree_type\" tax_term=\"accelerated-masters\" tax_operator=\"IN\" aspect_ratio=\"3x2\" include_excerpt=\"true\"]<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Common blog IDs and post types<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Emergencies: 12 (post type: posts)<\/li>\n\n\n\n<li>Events: 7 (post type: tribe_events)<\/li>\n\n\n\n<li>Faculty profiles: 5 (post type: cu_faculty)<\/li>\n\n\n\n<li>News: 37 (post type: story)<\/li>\n\n\n\n<li>People directory: 9  (post type: cu_people)<\/li>\n\n\n\n<li>Maps: 10 (post type: campus_map_place)<\/li>\n\n\n\n<li>Courses: 2  (post type: clarku_course)<\/li>\n\n\n\n<li>Programs: 2 (post type: clarku_program)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Custom ClarkU attributes<\/h2>\n\n\n\n<p>Clark has implemented a few custom attributes that make it easy to create beautiful, dynamic lists of content.  The most important attribute to know about is called &#8220;template.&#8221;  Most templates ignore the display posts formatting parameters, but they do tend to   There are a few generic templates, and a few very specific ones:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cards<\/strong>  <code>template=\"cards\"<\/code>  formats the posts as a grid of tiled cards.  Cards has three additional parameters:\n<ul class=\"wp-block-list\">\n<li>Show Search <code>show_search=\"true\"<\/code> will display a filter bar above the cards.  Like in the program finder.<\/li>\n\n\n\n<li>Show Search Taxonomy <code>show_search_taxonomy=\"category, tags\"<\/code> allows you to identify drop-down filters that appear next to the text search.<\/li>\n\n\n\n<li>Aspect ratio <code>aspect_ratio=\"3x2\"<\/code> makes the images on the cards to conform to a particular aspect ratio so they all look uniform. Other available aspect ratios are: <code>16x9<\/code>, <code>1x1<\/code>, and <code>2x3<\/code>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Courses<\/strong> <code>template=\"courses\"<\/code> displays courses in a grid layout.<\/li>\n\n\n\n<li><strong>Courses<\/strong> <code>template=\"courses-list\"<\/code> displays courses in a list layout.<\/li>\n\n\n\n<li><strong>Events Grid<\/strong> <code>template=\"events-grid\"<\/code> displays events cards in a grid layout.<\/li>\n\n\n\n<li><strong>Events List<\/strong> <code>template=\"events-list\"<\/code> displays events as a concise list.<\/li>\n\n\n\n<li><strong>Events Sponsor<\/strong> <code>sponsor_id=\"\"<\/code> limits events to particular sponsor(s) by id.<\/li>\n\n\n\n<li><strong>Events Venue<\/strong> <code>venue_id=\"\"<\/code> limits events to particular venue(s) by id.<\/li>\n\n\n\n<li><strong>Faculty Grid<\/strong> <code>template=\"faculty-grid\"<\/code> displays faculty profiles in a grid layout.<\/li>\n\n\n\n<li><strong>Faculty List<\/strong> <code>template=\"faculty-list\"<\/code> displays faculty profiles as a list, used in faculty profiles.<\/li>\n\n\n\n<li><strong>Grid<\/strong> <code>template=\"grid\"<\/code> looks similar to cards, but the items are not linked to anything.<\/li>\n\n\n\n<li><strong>Stories Grid<\/strong> <code>template=\"stories-grid\"<\/code> looks similar to cards, but they display the topic instead of the category.<\/li>\n\n\n\n<li><strong>Stories List<\/strong> <code>template=\"stories-list\"<\/code> look like horizontally-oriented cards, but they display the topic instead of the category.<\/li>\n\n\n\n<li><strong>People Table<\/strong> <code>template=\"people-table\"<\/code> displays people in a table format, used on the people directory.<\/li>\n\n\n\n<li><strong>Programs Grid<\/strong> <code>template=\"programs-grid\"<\/code> displays programs as cards in a grid layout, and includes a filter.<\/li>\n\n\n\n<li><strong>Programs Table<\/strong> <code>template=\"programs-table\"<\/code> displays programs in a table layout, and includes a filter.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">    <a\n        class=\"clarku-block-card \"\n        href=\"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/news-lists\/\"\n    >\n                            <div\n                class=\"clarku-block-card-content\"\n            >\n                \n\n<h3 class=\"wp-block-heading\">News<\/h3>\n\n\n\n<p>Display recents news.<\/p>\n\n            <\/div>\n            <\/a>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">    <a\n        class=\"clarku-block-card \"\n        href=\"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/events-lists\/\"\n    >\n                            <div\n                class=\"clarku-block-card-content\"\n            >\n                \n\n<h3 class=\"wp-block-heading\">Events<\/h3>\n\n\n\n<p>Display events from the calendar.<\/p>\n\n            <\/div>\n            <\/a>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">    <a\n        class=\"clarku-block-card \"\n        href=\"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/faculty-lists\/\"\n    >\n                            <div\n                class=\"clarku-block-card-content\"\n            >\n                \n\n<h3 class=\"wp-block-heading\">Faculty<\/h3>\n\n\n\n<p>Display faculty profiles.<\/p>\n\n            <\/div>\n            <\/a>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Show a list of recent news, upcoming events, topical research, or more. Display posts from the current site If you&#8217;d like to display a list of posts on your site, you can do that with a shortcode called Display Posts. Display Posts lets you use a shortcode to do all of the hard work. The [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"parent":144,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Dynamic post lists - ClarkU WordPress<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dynamic post lists\" \/>\n<meta property=\"og:description\" content=\"Show a list of recent news, upcoming events, topical research, or more. Display posts from the current site If you&#8217;d like to display a list of posts on your site, you can do that with a shortcode called Display Posts. Display Posts lets you use a shortcode to do all of the hard work. The [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/\" \/>\n<meta property=\"og:site_name\" content=\"ClarkU WordPress\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-10T21:44:51+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/dynamic-content\\\/dynamic-post-lists\\\/\",\"url\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/dynamic-content\\\/dynamic-post-lists\\\/\",\"name\":\"Dynamic post lists - ClarkU WordPress\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/#website\"},\"datePublished\":\"2025-02-01T23:52:34+00:00\",\"dateModified\":\"2025-11-10T21:44:51+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/dynamic-content\\\/dynamic-post-lists\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/wp-json\\\/wp\\\/v2\\\/pages\\\/6#breadcrumbs\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":0,\"name\":\"ClarkU\",\"item\":\"https:\\\/\\\/www.clarku.edu\\\/\"},{\"@type\":\"ListItem\",\"position\":1,\"name\":\"ClarkU WordPress\",\"item\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/\",\"name\":\"ClarkU WordPress\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.clarku.edu\\\/wordpress\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Dynamic post lists - ClarkU WordPress","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/","og_locale":"en_US","og_type":"article","og_title":"Dynamic post lists","og_description":"Show a list of recent news, upcoming events, topical research, or more. Display posts from the current site If you&#8217;d like to display a list of posts on your site, you can do that with a shortcode called Display Posts. Display Posts lets you use a shortcode to do all of the hard work. The [&hellip;]","og_url":"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/","og_site_name":"ClarkU WordPress","article_modified_time":"2025-11-10T21:44:51+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/","url":"https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/","name":"Dynamic post lists - ClarkU WordPress","isPartOf":{"@id":"https:\/\/www.clarku.edu\/wordpress\/#website"},"datePublished":"2025-02-01T23:52:34+00:00","dateModified":"2025-11-10T21:44:51+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.clarku.edu\/wordpress\/dynamic-content\/dynamic-post-lists\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/pages\/6#breadcrumbs","itemListElement":[{"@type":"ListItem","position":0,"name":"ClarkU","item":"https:\/\/www.clarku.edu\/"},{"@type":"ListItem","position":1,"name":"ClarkU WordPress","item":"https:\/\/www.clarku.edu\/wordpress"}]},{"@type":"WebSite","@id":"https:\/\/www.clarku.edu\/wordpress\/#website","url":"https:\/\/www.clarku.edu\/wordpress\/","name":"ClarkU WordPress","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.clarku.edu\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/pages\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":20,"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/pages\/6\/revisions"}],"predecessor-version":[{"id":641,"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/pages\/6\/revisions\/641"}],"up":[{"embeddable":true,"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/pages\/144"}],"wp:attachment":[{"href":"https:\/\/www.clarku.edu\/wordpress\/wp-json\/wp\/v2\/media?parent=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}