The News updates listing template turns a page into the list of every news update on the intranet: the short operational notices such as “Email is running slowly” or “Lift out of order”, newest first, with a row of filters for the update types. It is the page the News updates widget’s “More updates” link goes to, the page an update’s type links return to, and the page that gives each update its breadcrumb. It needs the News updates module. Switching the module on, the edit screen, types and icons, and expiry are all in Set up and use news updates.
Create the news updates page and choose it in Options
- Go to Options, then Modules, and make sure News updates is switched on.
- Go to Pages, then Add New. Give the page a title such as “News updates” or “Notices”, and in the Page Attributes box set Template to News updates listing. Anything typed in the editor appears under the page title, above the type filters. The page’s Sidebar box appears as a right-hand column beside the list.
- Publish the page, then go back to Options, Modules, open the News updates tab and choose the page as the News updates page. Select Update.
- Add the page to a menu. See Setup navigation menus.
The page works before it is chosen in Options, but the widget’s “More updates” link, the type links in the sidebar of each update and the breadcrumbs on update pages only point to it once it is. The steps for the Template dropdown are in Change a page layout.
What the News updates page shows
The page title, then a row of pills: All first, followed by every top-level news update type that has at least one published update, in alphabetical order, each with the icon set on the type. The pill for the current view is highlighted. Below the pills is the list of updates, newest first. Each row shows the update’s featured image if it has one, its title, the date it was published, the first 25 words of its excerpt (or of its content when the excerpt is empty), and a comment count when it has comments. On the All view each row also shows the name and icon of the update’s type. An update with more than one type shows the first.
The number of updates per page is the Blog pages show at most setting under Settings, Reading, which is 10 unless you have changed it. Page links appear below the list when there are more. A page with no published updates says “No news updates found”.
If the page’s Sidebar box has anything in it, the list takes two thirds of the width and the sidebar content sits on the right. There is no widget area on this page; widgets for news updates go on the homepage or in the News Update Sidebar area, which appears on each update’s own page.
Filter the list by type
Selecting a type pill shows only the updates of that type. The type name is no longer repeated on each row, because every row is the same type. If the type has sub-types, a second row of pills appears beneath the first, one per sub-type that has updates. Selecting a sub-type narrows the list to it and keeps the parent pill highlighted, so the reader can step back up. A type with no sub-types shows no second row. Select All to clear the filter.
The filter is in the page address, as ?type= followed by the type’s slug, for example /news-updates/?type=it-updates. Use that form to link to one type of update from a menu, a page or an email. The slug is shown on the type’s edit screen under News updates, News update types.
Links that land on this page
- The News updates widget: its “More updates” link (or your own link text) goes to this page. When the widget is limited to a single type, the link opens the page filtered to that type. See (Govintra) News updates widget.
- Type links on an update’s page: the type pills in the sidebar of each news update open this page filtered to that type.
- Type archives: the address WordPress gives each type,
/news-update-type/followed by the slug, redirects permanently to this page with the type filter applied. Old links and bookmarks keep working. - Breadcrumbs: every news update shows Home, then this page, then its title.
When no News updates page is chosen in Options, these links fall back to the plain type archive, which lists the updates without the pills or the page’s sidebar.
What content the page draws on
- News updates: everything published under News updates in the admin menu. Drafts, scheduled and private updates are left out. An update that has expired with the action Revert to draft or Move to trash leaves the list; one that expired with Change type moves to its new type’s pill.
- News update types: the pills come from News updates, News update types, including each type’s icon, icon style and colours. Types can be nested one level for the sub-type row. See News update types.
- The page itself: only its title and its Sidebar box.
News stories never appear here. They have their own page, using the News listing template, and their own types.
Related options and widgets
- Options, Modules, News updates tab: News updates page (this page), plus Force expiry date and Default expiry period, which control how long updates stay on the list.
- Settings, Reading, Blog pages show at most: updates per page, shared with the News and Blog listings.
- Comms hub template: shows news updates as a band alongside news and blog posts, as an alternative front door to this page. See Comms hub template.
Related
- Available templates: every page template in the theme.
- Set up and use news updates: the module, the edit screen, types and icons, and expiry.
- Module settings and options: switching modules on and off.
