Show a list of recent news, upcoming events, topical research, or more.
Display posts from the current site
If you’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 shortcode has many parameters that you can use to customize the display. A simple example that shows up to 10 announcements from the past two years would be:
[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"]
Display posts from another ClarkU site
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’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’s Degrees, you’d do it like so:
[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"]
Common blog IDs and post types
- Emergencies: 12 (post type: posts)
- Events: 7 (post type: tribe_events)
- Faculty profiles: 5 (post type: cu_faculty)
- News: 37 (post type: story)
- People directory: 9 (post type: cu_people)
- Maps: 10 (post type: campus_map_place)
- Courses: 2 (post type: clarku_course)
- Programs: 2 (post type: clarku_program)
Custom ClarkU attributes
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 “template.” 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:
- Cards
template="cards"formats the posts as a grid of tiled cards. Cards has three additional parameters:- Show Search
show_search="true"will display a filter bar above the cards. Like in the program finder. - Show Search Taxonomy
show_search_taxonomy="category, tags"allows you to identify drop-down filters that appear next to the text search. - Aspect ratio
aspect_ratio="3x2"makes the images on the cards to conform to a particular aspect ratio so they all look uniform. Other available aspect ratios are:16x9,1x1, and2x3.
- Show Search
- Courses
template="courses"displays courses in a grid layout. - Courses
template="courses-list"displays courses in a list layout. - Events Grid
template="events-grid"displays events cards in a grid layout. - Events List
template="events-list"displays events as a concise list. - Events Sponsor
sponsor_id=""limits events to particular sponsor(s) by id. - Events Venue
venue_id=""limits events to particular venue(s) by id. - Faculty Grid
template="faculty-grid"displays faculty profiles in a grid layout. - Faculty List
template="faculty-list"displays faculty profiles as a list, used in faculty profiles. - Grid
template="grid"looks similar to cards, but the items are not linked to anything. - Stories Grid
template="stories-grid"looks similar to cards, but they display the topic instead of the category. - Stories List
template="stories-list"look like horizontally-oriented cards, but they display the topic instead of the category. - People Table
template="people-table"displays people in a table format, used on the people directory. - Programs Grid
template="programs-grid"displays programs as cards in a grid layout, and includes a filter. - Programs Table
template="programs-table"displays programs in a table layout, and includes a filter.