How to display functions Script on mobile only

This topic has 3 replies, 3 voices, and was last updated 11 months, 1 weeks ago ago by Andrew Mitchell

  • Avatar: ziga32
    ziga32
    Participant
    December 6, 2021 at 16:27

    I want to display product title befort the product image in shop loop.

    I found a code it does that perfectly:

    add_action(‘woocommerce_after_shop_loop_item_title’, ‘woocommerce_after_shop_loop_item_title_short_description’, 5);

    function product_change_title_position(){
    remove_action(‘woocommerce_shop_loop_item_title’,’woocommerce_template_loop_product_title’);
    add_action(‘woocommerce_before_shop_loop_item_title’,’woocommerce_template_loop_product_title’, 5);
    }
    add_action(‘init’,’product_change_title_position’);

    But I only want to make this happen on mobile. Is that possible?

    2 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 6, 2021 at 19:36
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    January 18, 2024 at 10:28

    Dear ziga32,

    We trust our theme is enhancing your experience. Taking a brief moment to rate it with a glowing 5 stars on ThemeForest would be immensely appreciated. Your feedback holds significant value for us.

    Click here to rate now: https://themeforest.net/downloads

    Thank you sincerely for your ongoing support!

    Best Regards,
    The 8Theme Team

  • Viewing 3 results - 1 through 3 (of 3 total)

The issue related to '‘how to display functions Script on mobile only’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.