I want to choose the best way to separate the mobile template and the desktop. Is this the right way?
If I put this code in the index.php
file:
<?php if ( wp_is_mobile() ) : ?>
<?php get_template_part('template-parts/mobile'); ?>
<?php else : ?>
<?php get_template_part('template-parts/desktop'); ?>
<?php endif; ?>