For a publishing site, I'm able to add Custom Actions to the site actions menu. Now I would like to hide all the default ones (except Edit Page). I tried to do this with the HideCustomAction Element but this doesn't seam to work.

In a publishing site I like to hide:

-New page ( * )
-New document Library
-new Site
-More Options

-Manage Content and Structure ( * )
-View all site content
-Edit in SharePoint Designer
-Site Permissions
-Site Settings

Removing them in the master page or using the security trimmed parameter is not realy an option since I could still see (*)

3 Answers 3


While it might be possible with JavaScript (and a sprinkle of jQuery if you like) you most likely end up like me writing a .NET WebControl to accomplish that task as using the HideCustomActionElement and masterpage tweaking methods do have some gotchas with SharePoint publishing features enabled.

To get started check out this thread Hide "New Site" on Site Actions menu?


r you interested using jquery? If you want to than just check below script in your console Is this work or not.

try this :


   var i = 0;
          if(i != 0)


Maybe you could accomplish it with the HideCustomActionElement with a custom Feature.

  • As mentioned I tried this but for some reason it doesn't work<br> <br><HideCustomAction<br> Id="HideCreatePublishingPage"<br>GroupId="SiteActions"<br> HideActionId="PublishingSiteActionsMenuCustomizer"<br> Location="Microsoft.SharePoint.StandardMenu"> </HideCustomAction>
    – Wim Hill
    Aug 16, 2011 at 12:11
  • Did you deploy this HideCustomAction with a feature scoped for Web and did you make sure the feature is activated?
    – Matthias
    Aug 16, 2011 at 12:32
  • I did even site scoped... And my custom actions that I add work fine
    – Wim Hill
    Aug 16, 2011 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.