SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 (*)

share|improve this question

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?

share|improve this answer

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)

share|improve this answer

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

share|improve this answer
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 '11 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 '11 at 12:32
I did even site scoped... And my custom actions that I add work fine – Wim Hill Aug 16 '11 at 12:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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