[Fix] - Sharepoint 2013 - Remove Recent from left menu
Error :
- Sharepoint 2013 Remove Recent from left menu
Scenario :
- When I try to remove (or hide) the "Recent" menu header from the left menu in SharePoint 2013. This is for specified site collections/sites/pages, not farm-wide.
- So far, I have tried to do this via JQuery by adding the following code
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
</script>
- And on trying it in terms of both script web-part and content editor web-part (using embed code), still it seems nothing available.
- Later on while trying to add the code to the .js file (without the script tags) and calling it as
<script type="text/javascript" src="/_layouts/15/menu.remove.recent.js">
</script>
- instead, of this code it wont works.
Fix for the issue:
Fix 1 :
- This procedure will be applicable for specific site collection
- Go to site settings -> navigation settings-> remove the "Recent" heading and its links.
Fix 2 :
- Here is the fix to resolve this issue by using the reference JQuery library.
- After that add the code in the Content Editor of the Web Part in the view page (e.g. AllItems.aspx) of the Pages library, then the "Recent section" will be hidden when we access this AllItems.aspx page.
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
</script>
Applies to :
- Sharepoint 2012
- Sharepoint 2013
- SharePoint 2013/Office 365
Related Tags :
- Searches related to Sharepoint - Remove "Recent" from left menu
- sharepoint 2013 remove recent from quick launch
- sharepoint 2013 hide recent quick launch
- sharepoint 2013 hide updated pages
- sharepoint 2013 recent folder
- sharepoint 2013 add recent quick launch
- hide recent sharepoint 2013 css
- sharepoint 2013 hide site contents in quick launch
- recent link in sharepoint 2013
- Hide Recent Items in SharePoint 2013/Office 365