How to hide content on mobile using the functions.php file
-
I have inserted an image onto my woo-commerce single product page using the below hook and code written into my functions.php file:
add_action('woocommerce_after_single_product_summary', add_content_on_woocommerce_after_single_product_summary',1); function add_content_on_woocommerce_after_single_product_summary() { echo "<img src='https://mywebsite/wp-content/uploads/2022/02/blocks.png' >" ; }
I only want this image to display on mobile and not desktop. Is there any code I can add to this in my functions.php file to achieve this?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to hide content on mobile using the functions.php file’ is closed to new replies.