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; ?>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742417176a4439964.html
评论列表(0条)