Hide properties in ProfileInfo Web Part - SharePoint 2013 on-premises

Jul 01
Hide properties in ProfileInfo Web Part - SharePoint 2013 on-premises

​Ever felt like hiding some of the default properties shown in the ProfileInfo Web Part on Person.aspx? These are the properties that are displayed in the Web Part even if they are not selected to be displayed in User Profile Service.

Here's how you can do it -

Enable Publishing Features on the My Site. Edit Person.aspx page. Add script editor Web Part in the page. Enter below code in the script editor Web Part.

<script type="text/javascript">

$(document).ready(function () {
     $("#ProfileViewer_ValueOffice").parent("div").hide();
});

</script>

This code will hide the Office property. If you need to hide or format any other property, just find the HTML ID of that property and use javascript to manipulate the property.