Only show buy now button on mobile. css error

This topic has 6 replies, 3 voices, and was last updated 2 years, 2 months ago ago by Awais Ahmed

  • Avatar: Recep
    Recep
    Participant
    September 2, 2022 at 12:45

    Hi,

    you sent me a custom css for my website before. but when I apply this to my other website it doesn’t work. can you help me? What I wanted to do was show only the buy now button on mobile.

    Regards,

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 2, 2022 at 13:27

    Hello,

    @media only screen and (max-width:480px){
        .single-product .product-information .single_add_to_cart_button:not(.et-single-buy-now), .cart .et-or-wrapper {
            display: none;
        }
    }

    Do you mean this code?

    Regards

    Avatar: Recep
    Recep
    Participant
    September 2, 2022 at 13:38

    Hi,

    I have this code in style css. https://snipboard.io/ixOrGT.jpg

    @media only screen and (max-width: 767px) {
    .etheme-sticky-cart .add_to_cart_button, .etheme-sticky-cart .et-or-wrapper {
    display: none;
    }
    }

    I have this code in function.php. https://snipboard.io/ayD8T2.jpg

    add_filter(‘etheme_sticky_add_to_cart_buy_now_hide_mobile’, ‘__return_false’);

    and this is the result. https://snipboard.io/PNk6KX.jpg

    but this is what i expect. https://snipboard.io/m6RpwD.jpg

    just the “buy now” button.

    Regards.

    Avatar: Awais Ahmed
    Awais Ahmed
    Participant
    September 3, 2022 at 05:57

    Hello, @Recep,

    I have solved your issue, I have added the below-given code to your site Theme Settings >> Theme Custom CSS >> Mobile and Mobile Landscape.

    https://postimg.cc/SjTjGVqk

    .etheme-sticky-cart button.add_to_cart_button {
        display: none !important;
    }
    .etheme-sticky-cart p.price {
        display: none !important;
    }

    Here is the resulting screenshot: https://postimg.cc/56Wvznmy

    Regards 8Themes Team.

    Avatar: Recep
    Recep
    Participant
    September 3, 2022 at 09:23

    Hi,

    thank you so much.

    Avatar: Awais Ahmed
    Awais Ahmed
    Participant
    September 3, 2022 at 09:35

    Hello, @Recep,

    Sounds Great! that your issue has been solved.

    Thanks for contacting us.
    Have a great day ?

    Topic Closed!
    Regards 8Themes Team.

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

You must be logged in to reply to this topic.Log in/Sign up

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