HUSKY - Products Filter Professional for WooCommerce

デバイスに応じてサイトの CSS を操作する方法

Sometimes users need manipulate the site css depending of the client device <PC or Mobile>. You can do it with the next code example, which should be placed on the file footer.php 現在の WordPress テーマの:

<?php 
if (WOOF_HELPER::is_mobile_device()): ?>
 <style type="text/css">
                .woof_show_auto_form {
                    display: inline-block !important;
                }
            </style>

            <?php else: ?>
            <style type="text/css">
                .woof_show_auto_form {
                    display: none !important;
                }
            </style> 
<?php endif; ?>

現在の例では、PCでwoof自動フォームボタンを非表示にし、モバイルデバイスで表示する方法を示しています…