  {"id":3596,"date":"2024-12-11T15:55:22","date_gmt":"2024-12-11T20:55:22","guid":{"rendered":"https:\/\/www.montclair.edu\/university-communications\/?page_id=3596"},"modified":"2024-12-11T15:55:22","modified_gmt":"2024-12-11T20:55:22","slug":"news-feeds","status":"publish","type":"page","link":"https:\/\/www.montclair.edu\/university-communications\/web-development-and-experience\/montclair-edu-website-framework\/wordpress-shortcodes\/news-feeds\/","title":{"rendered":"News Feeds"},"content":{"rendered":"<p>The <strong>newsfeed<\/strong> shortcode can be used to display a grid or list of a WordPress site\u2019s blog posts (or, if you\u2019re transitioning from the old site, from the University News system) on any page. It offers five optional attributes with which to control layout:<\/p>\n<h2>Horizontal Layout<\/h2>\n<div class=\"prpl-row lt-gray\"><div class=\"prpl-column one-half\">\n<figure class=\"responsive-image-holder wp-caption alignnone\"><img decoding=\"async\" class=\"mlt-responsive-image\" data-original-image=\"\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/newsfeed-homepage-horizontal.jpg.3.2x.generic.jpg\" src=\"\/responsive-media\/cache\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/newsfeed-homepage-horizontal.jpg.3.2x.generic.jpg.0.1x.generic.jpg\"\/><\/figure>\n<p>Items laid out horizontally on a homepage template will display with four items across the screen.<\/p>\n<\/div><div class=\"prpl-column one-half\">\n<figure class=\"responsive-image-holder wp-caption alignnone\"><img decoding=\"async\" class=\"mlt-responsive-image\" data-original-image=\"\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/newsfeed-horizontal.jpg.3.2x.generic.jpg\" src=\"\/responsive-media\/cache\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/newsfeed-horizontal.jpg.3.2x.generic.jpg.0.1x.generic.jpg\"\/><\/figure>\n<p>Items laid out horizontally on a default template will display with three items across the screen.<\/p>\n<\/div><\/div>\n<h2>Vertical Layout<\/h2>\n<p>You can use the vertical layout option to display two feeds side-by-side or to put a news feed next to a social media feed.<\/p>\n<div class=\"prpl-row lt-gray\"><div class=\"prpl-column\">\n<figure class=\"responsive-image-holder wp-caption alignnone\"><img decoding=\"async\" class=\"mlt-responsive-image\" data-original-image=\"\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/newsfeed-vertical.jpg.5.2x.generic.jpg\" src=\"\/responsive-media\/cache\/university-communications\/wp-content\/uploads\/sites\/144\/2024\/12\/newsfeed-vertical.jpg.5.2x.generic.jpg.0.1x.generic.jpg\"\/><\/figure>\n<\/div><\/div>\n<p>You can also use the attribute <strong>channel<\/strong> to display a channel from the University News system instead of the posts from the WordPress site.<\/p>\n<h2>Attributes<\/h2>\n<table class=\"responsive-table\">\n<thead>\n<tr>\n<th scope=\"col\">Name<\/th>\n<th scope=\"col\">Possible Values<\/th>\n<th scope=\"col\">Required<\/th>\n<th scope=\"col\">Notes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>category<\/td>\n<td>text<\/td>\n<td>No<\/td>\n<td>The slug (see WordPress <strong>Categories<\/strong> menu)<\/td>\n<\/tr>\n<tr>\n<td>channel<\/td>\n<td>a number<\/td>\n<td>No<\/td>\n<td>If set, a Channel ID from the University News system<\/td>\n<\/tr>\n<tr>\n<td>maxitems<\/td>\n<td>a number<\/td>\n<td>No<\/td>\n<td>How many articles to show<\/td>\n<\/tr>\n<tr>\n<td>noimages<\/td>\n<td><strong>true<\/strong> or <strong>false<\/strong><\/td>\n<td>No<\/td>\n<td>If set to true, images will not be displayed<\/td>\n<\/tr>\n<tr>\n<td>vertical<\/td>\n<td><strong>true <\/strong>or <strong>false<\/strong><\/td>\n<td>No<\/td>\n<td>Default: <strong>false<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Code Sample<\/h2>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n\r\n&#x5B;newsfeed vertical=&quot;false&quot; maxitems=&quot;4&quot;]\r\n\r\n&#x5B;newsfeed vertical=&quot;true&quot; maxitems=&quot;4&quot;]\r\n\r\n&#x5B;newsfeed vertical=&quot;true&quot; maxitems=&quot;4&quot; channel=&quot;7&quot;]\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The newsfeed shortcode can be used to display a grid or list of a WordPress site\u2019s blog posts (or, if you\u2019re transitioning from the old site, from the University News system) on any page. It offers five optional attributes with which to control layout: Horizontal Layout Vertical Layout You can use the vertical layout option [&hellip;]<\/p>\n","protected":false},"author":411,"featured_media":3554,"parent":3552,"menu_order":19,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-3596","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/users\/411"}],"replies":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/comments?post=3596"}],"version-history":[{"count":2,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3596\/revisions"}],"predecessor-version":[{"id":3706,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3596\/revisions\/3706"}],"up":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/pages\/3552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/media\/3554"}],"wp:attachment":[{"href":"https:\/\/www.montclair.edu\/university-communications\/wp-json\/wp\/v2\/media?parent=3596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}