• Resolved paperzz

    (@paperzz)


    Hello,
    I need the Plugin only for one site on my website. so can i deactivated the other ones or how is that working?
    Also am i able to not show the button on the bottem and just translate the site insatntly.
    Thank you for help ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Julien MA Jacob

    (@wpr0ck)

    Hello @paperzz,

    For the 1rst part of your message, you speak about a WordPress multi-site ?
    If yes, you can activate the plugin on the website you need it.

    If you don’t need the button, you can use this filter :

    
    
    add_filter( 'weglot_button_html', 'custom_weglot_button_html', 10, 2 );
    function custom_weglot_button_html( $button_html, $add_class ) {
    
    	return '';
    }
    

    Then you can also dequeue the CSS and JS with this hooks :

    
    add_action( 'wp_print_scripts', 'prefix_deregister_javascript', 99 );
    function prefix_deregister_javascript() {
    
    	if ( is_admin() ) {
    		return;
    	}
    
    	wp_deregister_script( 'wp-weglot-js' );
    }
    
    add_action( 'wp_print_styles', 'prefix_deregister_styles', 99 );
    function prefix_deregister_styles() {
    
    	if ( is_admin() ) {
    		return;
    	}
    
    	wp_deregister_style( 'weglot-css' );
    }
    

    `

    Let me know if that solve your needs,
    Best regards,

    Thread Starter paperzz

    (@paperzz)

    Yes thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only one site’ is closed to new replies.