Support » Plugin: MultilingualPress » Is there any way I can decativate MultilingualPress for any Native Post Type?

  • Resolved Mayeenul Islam

    (@wzislam)



    Actually I built a network (1: bn_BD, 2: en_US), where I enabled Guest Blogging only in blog#1. All the blog entries will be in Bengali (so in blog#1), and there’s no need to enable MultilingualPress’s English post fields there, you know.

    So, I need a way to disable MultilingualPress for default/native post type post.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Guido Scialfa

    (@wido)

    Hi @wzislam,

    Currently isn’t possible to set post type support per site basis, the configuration is global.

    You can use the following workaround to not show the translation metaboxes in the site 1 even though it’s only a solution to prevent users to see the translation boxes, no logic for translation will be removed.

    Simply put the code in your child theme functions.phpand make sure you don’t get any error because of the formatting quotes '.

    
    add_action( 'inpsyde_mlp_loaded', function () {
    
    	if ( 1 === get_current_blog_id() ) {
    		remove_action( 'inpsyde_mlp_loaded', 'mlp_feature_translation_metabox' );
    	}
    }, 0 );
    

    Ps. Remember to do the changes using an ftp or ssh connection not directly by the wordpress backend to prevent issues, so in case you can revert the changes.
    (generally problems are because the copy/paste of formatted characters.

    If you don’t want to show the translation boxes only for specific users roles let me know.

    Thank you @wido.

    But I’m afraid, the code is not working in MultilingualPress v2.11.1. I put out the conditional, changed the priority – but no luck. 🙁

    Don’t worry about any error, the site is still in my localhost, and under massive development.

    But @wido you gave me a good indication that helped me solving my issue. I’m removing the meta boxes from post type post in both of my sites.

    add_action( 'do_meta_boxes', 'test_remove_plugin_metaboxes' );
    function test_remove_plugin_metaboxes(){
        remove_meta_box( 'inpsyde_multilingual_2', 'post', 'advanced' );
        remove_meta_box( 'inpsyde_multilingual_1', 'post', 'advanced' );
    }

    The parameters can be found here in their Github repo. It’s done in MLP v2.11.1.

    Plugin Author Guido Scialfa

    (@wido)

    Hi @wzislam,

    Sorry that didn’t worked, I tried in my installation with successfull result.

    Btw I’m glad you solved your issue by removing the metabox and thanks for sharing the solution with us.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is there any way I can decativate MultilingualPress for any Native Post Type?’ is closed to new replies.