This is a downloadable display template that you install on your site collection to allow any Content Search Web Part (CSWP) to display announcement items with an icon, body text, author and posted date.
Compared to the CSWP Simple Announcements format, this display template adds a hover affect, the ability to have 4 field references instead of 3, allows you to display the first line of the announcement body, and eliminates the need to add a script editor with a link reference to each page the CSWP is on.
Adding Discussion Display Template to Site Collection
You must have manage hierarchy permissions or higher on the site collection home in order to upload new display templates.
1. Download and extract the 3 files from the zip file:
Upload the CSS file and icon
2. Add the CSS file and Icon to the Style Library at the Site Collection top site.
3. If there are the green checked out icons next to the files, click the checkbox next to the 2 files, select the Files tab, and Check In the 2 files.
4. Select Major version if presented with an option, click OK.
Upload the display template
5. Go to the Site Collection Site Settings, select the Master pages and page layouts option.
6. Click on the Display Templates folder
7. Click on the Content Web Parts folder
8. Click on the Files tab, select Upload Document
9. Click the Browse button
10. Find and select the Item_custom_announcements HTML file that you extracted in Step 1.
11. The file properties window should popup, the Content Type, Title, Description, etc should all be pre-filled so just select Save.
12. Click the checkbox next to the Item_custom_announcements.html file, click on the File tab, Check In (if option if available), then Publish (if option is available).
Add and configure the CSWP on a page
13. Go to a page and edit the page, Insert a Content Rollup > Content Search Web Part onto the page. Edit the web part.
14. Click the Change query button.
15. Click the Switch to Advanced Mode option.
16. Edit the Query text, your query text should include the path to one or more sites or announcement lists, if you have multiple enclose the paths in brackets and separate with OR statements. Append SPContentType=Announcement to the end of the Query Text.
17. Click the Sorting tab, Sort by Created Descending. Click the OK button at the bottom to save your query.
18. Select how many items you want to display, select the Custom Announcements Item display template, click OK to save the web part settings.
Your CSWP should now be displaying announcements with the custom formatting: