Home Forums WoodMart support forum Ajax scroll to top

Ajax scroll to top

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #52364

    Andrew Forest
    Participant

    Hi there! I’f I’m using Ajax filters for shop pages, and also ajax scroll to top option turned on, which I want to always keep on, after applying a filter, the page does not scroll all the way to the top, there are like 30px left… I can “bypass” this problem by decresing/increasing (don’t remember which one) the height of the header.. But I cannot do that.

    #52369

    Artem Temos
    Keymaster

    Hi,

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    add_filter( 'woodmart_ajax_scroll_offset', function(){ return 0; } );

    Regards

    #52371

    Andrew Forest
    Participant

    Whoops. Added, but it’s like the distance doubled. Check it, please.

    #52379

    Artem Temos
    Keymaster

    Sorry, try this value instead

    add_filter( 'woodmart_ajax_scroll_offset', function(){ return 150; } );

    #52380

    Andrew Forest
    Participant

    Thank you. Worked perfectly 🙂 is there a way to remove the add to cart button hover effect on shop pages/carousels? i want the hover to be there, i just want the text to stay still and to remove the cart icon that appears when you hover it.

    #52405

    Hello,

    Please use this CSS, add it to Theme Settings > Custom CSS

    .woodmart-hover-standard .btn-add>a:focus span:not(.woodmart-tooltip-label), .woodmart-hover-standard .btn-add>a:hover span:not(.woodmart-tooltip-label) {
        transform:none!important;
    }
    .woodmart-hover-standard .btn-add>a:before {
        content:none!important;
    }

    Best Regards

Viewing 6 posts - 1 through 6 (of 6 total)