WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. 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

I'm trying to take away the option to have sharing options on 'pages' (but leave on posts).

So I have a function to make sure the sharing option is always no on pages

function page_disable_share($post_id)
if ( 'page' != get_post_type() )

    update_post_meta($post_id, "sharing_disabled", 1);
add_action('save_post', 'page_disable_share');

But I'd rather not have the meta box there at all, it might confuse the user if they tick it and it always unticks itself.

function page_remove_share()
    remove_meta_box( 'sharing_meta' , 'page' , 'normal' ); 
add_action('admin_menu' , 'page_remove_share');

Bu that's not working. Maybe JetPack is getting hooked in after 'admin_menu'? I tried other hooks (http://codex.wordpress.org/Plugin_API/Action_Reference) but none work. Any ideas?

share|improve this question
up vote 0 down vote accepted

Use the add_meta_boxes action with a very low priority, so:

function page_remove_share() {
    remove_meta_box( 'sharing_meta' , 'page' , 'advanced' ); 
add_action( 'add_meta_boxes', 'page_remove_share', 99 );

I think that should work.

share|improve this answer
It had so much potential, but unfortunately it doesn't work. – deadlyhifi Sep 28 '11 at 12:57
I had a look how it was hooked in in the plugin itself. The answer is: remove_meta_box( 'sharing_meta', 'page', 'advanced' ); The only difference is that the context is 'advanced'. I can't answer my own question because my rep isn't high enough. – deadlyhifi Sep 28 '11 at 13:06
Ok updated it :) – Joost de Valk Sep 28 '11 at 13:44

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.