// Check if we are on mobile
function jetpackme_is_mobile() {
// Are Jetpack Mobile functions available?
if ( ! function_exists( 'jetpack_is_mobile' ) )
return false;
// Is Mobile theme showing?
if ( isset( $_COOKIE['akm_mobile'] ) && $_COOKIE['akm_mobile'] == 'false' )
return false;
return jetpack_is_mobile();
}
// Let's remove the sharing buttons, but only if we're on a mobile device
function jetpackme_maybe_add_filter() {
// On mobile, and on the home page?
if ( jetpackme_is_mobile() ) {
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
}
}
add_action( 'wp_head', 'jetpackme_maybe_add_filter' );
// Build the function
function jptweak_remove_share() {
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
}
¿Buscas más consejos para móviles? ¡Los encontrarás aquí!
Quitar los botones para compartir de Jetpack en el tema móvil
Puedes añadir el siguiente código a un plugin de funcionalidades para eliminar los botones para compartir de Jetpack en el tema móvil:
Explora las ventajas de Jetpack
Descubre cómo Jetpack puede ayudarte a proteger, acelerar y hacer crecer tu sitio de WordPress.
¿Tienes alguna pregunta?
La sección de comentarios está cerrada para este artículo, pero seguimos aquí para ayudarte. ¡Visita el foro de soporte y estaremos encantados de responder a tus preguntas!


