The News listing template turns a page into the news landing page: every published news story, newest first, with filters by news type. It is normally applied to a page called News and linked from the main menu. To apply it, edit the page and choose News listing under Page Attributes, Template. Then go to Options, Modules, News and choose the page as the News page. The News module must be on.
What the news page shows
The page title, a row of news type filters, the stories, page links, and the News Landing widget area in the right-hand column. The content typed into the page’s own editor is not shown on this template, so there is no need to write an introduction there. The number of stories per page comes from Settings, Reading, “Blog pages show at most”. When there are no stories the page says “No news articles found.”
What each story card shows
The featured image as a small thumbnail, the title, the publish date, the number of comments if the story has any, and the first 25 words of the excerpt, or of the story if no excerpt has been written. A story with the Link post format shows an external link icon after its title. Selecting the image or title opens the story.
News type filters
The filter row shows All followed by every top-level news type that has at least one published story. Selecting a type narrows the list to that type and its sub-types. When the chosen type has sub-types, a second row of pills appears for them, so people can narrow further. The filter is carried in the page address, so a filtered view can be linked to or bookmarked. News types are managed under News, News types; see News types.
News type links on a story, and links to a news type’s own archive, are sent to the news page with that filter applied, as long as the News page option is set.
Options that affect the news page
Go to Options, Modules, then the News tab.
- News page: the page that uses this template. Used for breadcrumbs, menu highlighting, the “More news” link on the News widget and news type links.
- Need to know icon: the icon for the Need to know widget; it does not change this page.
Stories with auto-expiry set leave the page when their expiry date and time pass. See Module settings and options.
Widget area
The News Landing widget area, under Appearance, Widgets, fills the right-hand column. The Need to know widget, the News updates widget and intraverts are typical choices. The separate News Sidebar area appears on each story’s own page. To show stories on the homepage, use the News widget.
What the page draws on
News stories, added under News in the admin menu, with their news types, featured images and excerpts. Only published stories appear, with drafts, scheduled and expired stories left out. See Add or edit a news story. Short notices that expire are a different content type, news updates, with their own listing template; see What are news updates.
