[Resolved] Footer widget widths

Home Forums Support [Resolved] Footer widget widths

Home Forums Support Footer widget widths

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #906101
    David

    Hi there,

    I am using the code below to adjust footer widget widths (code from somewhere here I think!)
    And it works fine – it is being used on 7 product category pages.
    But one page does not require the first widget, but I can’t turn it off, as there is some code in the widget to display Woo Products in the right widget.
    So I need to know how to make the following 0 for footer_widget_1 and 100 for footer_widget_2 but just for one page?
    Page is linked below, you can see the 11 products with a blank left widget!
    TIA, Dave

    
    add_filter('generate_footer_widget_1_width','tu_custom_footer_1_width');
    function tu_custom_footer_1_width(){
        return'35';
    }
    
    add_filter('generate_footer_widget_2_width','tu_custom_footer_2_width');
    function tu_custom_footer_2_width(){
        return'65';
    }
    
    #906103
    Leo
    Staff
    Customer Support

    Hi there,

    Give this CSS a shot:

    body.page-id-15260 .footer-widget-1 {
        display: none;
    }
    @media (min-width: 1025px) {
        body.page-id-15260 .footer-widget-2.grid-65 {
            width: 100%;
        }
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know ๐Ÿ™‚

    #906104
    David

    Perfect, thanks Leo!

    #906106
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.