Any ideas how to edit Highlighted content card templates?

Copper Contributor

Hi, I'm looking to remove the 'edited by' and 'date' part of the card view when using the Highlighted Content webpart on a modern page. I can't find what the name of the display template it uses would be. Any guidance would be much appreciated card.JPG

17 Replies

Thanks for your inquiry @Isaac Titlow.


At the moment we don't allow you to change the layouts (either by altering the cards, or adding your own new layout) in Highlighted content. We have a backlog item to allow you remap X field to Y position (e.g. field mapping), and one to allow you to add your own layouts (e.g. display templates). 


It sounds like you'd like a third options, which is enable you to alter/augment/extend existing layouts shipped by Microsoft.


Any other ideas or specifics you need in this area?

It would we nice to get rid of the edited by on the card view. Any progress on customizing these?

It would be nice to be able to create a template within the UI and/or code. 


In the UI we build up the card template by adding/removing components and it saves some kind of json configuration, which could be exported and reused.


Creating custom templates and uploaded them with an app package would be nice too using the SharePoint extensions method.


I can't install SharePoint Server 2016 prerequisite installer.

Please help me to fix this error. 

@John Sanders Hi John, would love to have the ability to swap out "modified by" with another library column (or custom site column).  For example if we are tagging documents with a custom column called "Content Owner" would be more meaningful.  Though I realize that would cause issues if you are filtering on multiple libraries or sites that might not have that custom column.


Also, maybe the ability to "not" display "Modified By".

There is a workaround that I found to remove this data or at least make it appear as blank. If you go to the "Modified By" column in the library the Highlighted Content web part is connected to, select "Created" from the "Show Field" drop down. While this is not a perfect fix, I was able to meet my requirement to remove this data from the Highlighted Content web part view.

@Mike_M518 Your workaround works, thank you! However, note it only works if the Highlighted Content Web Part is displaying content from the pages library on the same site it is deployed on. I would like to achieve this in a HC web part on the hub site, displaying content from all associated sites

Hi Team, wondering if there is any news on this becoming an option in the future?
Either - remove the edited by from the view
Or - show "created by" instead
Really useful workaround - thanks.
Any news, this would be very helpful!

@Isaac Titlow 


Insert this code as a modern script editor underneath the highlighted content to remove the modified section:


<style type="text/css">

.ms-DocumentCardTile .ms-DocumentCard:not(.ms-DocumentCard--compact) .ms-DocumentCardActivity {
Visibility:hidden !important;


@Ryan Gardner - there is no Modern Script Editor webpart? Where would I need to get that?

My apologies as I forgot this wasn't something out of the box. More information on SP_DEV-FX-WEBPARTS can be found here:

Technical information regarding this app is here:

@Ryan Gardner Thank you for the information, unfortunately we are the government tenant so I will probably not be able to install.

@Ryan Gardner I've looked & I do not see anything called Modern Script Editor,  the closeet to this that I see is called (under Advanced wep parts) "code Snippet"  I've tried using that and setting the type of code to CSS, since that is mentioned in your code.  but it does not work -- Am I missing a web part called 'Modern Script Editor?'   is that an add-on to standard web parts that are available?

@JodyM2273 My apologies as I forgot this wasn't something out of the box. More information on SP_DEV-FX-WEBPARTS can be found here:

Technical information regarding this app is here:

@Ryan Gardner 

an idea could  be that of providing the capability to filter upon a content type, so that you have by definition all the filtered items with the same columns. At that point you can easly allow card layout definition in the same way you are able to do with lists' board cards layout .