Hello,
Is it better to use CSS or a php function to remove the footer + copyright bar on mobile? Which one results in a page with fewer assets loading and better performance?
I’m currently using this CSS to disable the footer and copyright in mobile:
@media (max-width: 768px) {
.site-footer {
display: none;
}
}
For performance on mobile, is it better to use a function like the one below from post-1344401?
add_action( 'wp', function() {
if ( wp_is_mobile() && is_user_logged_in() ) {
remove_action( 'generate_footer', 'generate_construct_footer_widgets', 5 );
remove_action( 'generate_footer', 'generate_construct_footer', 10 );
}
} );
Thank you and have a good day.
Cheers!
Andrés