[Resolved] widgets css help

Home Forums Support [Resolved] widgets css help

Home Forums Support widgets css help

Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #1192206
    johnaps

    Hello!
    I am trying to add the built in woocommerce widgets in my site on category pages for filtering product results…

    Problem is when i activate sidebar/content on sidebar layout in the prebuilt “1100px Content Container Width for Product Category Archive” hook of gp, then my whole page gets messed up… (in this hook i have set Content Width: 1269px)

    I want to add some filtes to the left on the available space, and some on the right on the blank space as well…
    But without breaking my current “geometry” of elements…
    Can you help me out?

    (live-site-alternative-link: https://sofianos-orthopedika.gr/%CE%BA%CE%B1%CF%84-%CE%BF%CE%AF%CE%BA%CE%BF%CE%BD-%CE%BD%CE%BF%CF%83%CE%B7%CE%BB%CE%B5%CE%AF%CE%B1/%CE%B2%CE%BF%CE%B7%CE%B8%CE%AE%CE%BC%CE%B1%CF%84%CE%B1-%CE%BA%CE%B1%CF%84%CE%AC%CE%BA%CE%BB%CE%B9%CF%83%CE%B7%CF%82/%CE%B1%CE%B5%CF%81%CF%8C%CF%83%CF%84%CF%81%CF%89%CE%BC%CE%B1/)

    Thanks in advance!!

    #1192302
    Leo
    Staff
    Customer Support

    Hi there,

    Using the Sidebar/Content/Sidebar layout would be your only choice I think.

    Problem is when i activate sidebar/content on sidebar layout in the prebuilt “1100px Content Container Width for Product Category Archive” hook of gp, then my whole page gets messed up… (in this hook i have set Content Width: 1269px)

    What’s messed when you do that? Can you activate it so I can see?

    #1192315
    johnaps
    #1192384
    Leo
    Staff
    Customer Support

    Can you disable your caching plugin first so we can inspect the code properly?

    #1192392
    johnaps

    Caching is disabled on staging by default. I also disabled wp rocket for you, although it wouldnt cache anything already as kinsta disables caching of external plugins by default… You can look again now, thanks!!

    #1192395
    Leo
    Staff
    Customer Support

    Any chance you can temporarily comment out all your custom CSS?

    And are you using a child theme? If so can you switch to a parent theme temprarily?

    The source of code all showing up quite odd on your page.

    Thank you.

    #1192399
    johnaps

    I am using child, all these breaking of css was caused when i activated sidebar/container/sidebar layout… i cant easily comment all custom css as it is quite a lot…
    I dont know if it will help you, but i switched to gp default theme…

    #1192405
    Tom
    Lead Developer
    Lead Developer

    The main issue here is there isn’t enough room for 4 columns in that little content area.

    The overflow issue you’re seeing is fixed in GPP 1.10. However, even the fix (if you add the below CSS) won’t look good, as there isn’t enough room:

    .woocommerce .wc-columns-container.wc-columns-4 .products, 
    .wc-related-upsell-columns-4 .related ul.products, 
    .wc-related-upsell-columns-4 .up-sells ul.products {
        grid-template-columns: repeat(4,minmax(0, 1fr));
    }
    #1192461
    johnaps

    Hello Tom! Thank you for your input! Isnt there any workaround to this? I should have a way to implement these filters right? Maybe enlarging the containers width? Or changing the products grid to have 3 columns instead of 4? Can you think of anything that would make this possible? Thank you in advance! Fingers crossed

    #1192707
    johnaps

    I made the container full width and it is better now with the space…
    I think the only option is to make the filters to open with a button in smaller media…
    Can i “hide” filters to open behind a button in smaller media with css? Or shouldnt i try it at all?

    #1193034
    Tom
    Lead Developer
    Lead Developer

    I would personally just change the number of columns: Customize > Layout > WooCommerce

    I’m not too sure what you mean regarding the filter button – can you explain a bit more?

    #1193073
    johnaps

    i mean like most sites, when you view prod category pages the filters are shown only if the user press a button… (sometimes they are off canvas, and sometimes they are drop down…)

    #1193135
    johnaps

    the above comment for filters to be shown in the click of a button only applies for mobile screens i mean…
    I think i fixed it without changing columns to 3, i just used sidebar/content layout…

    I would like to know though if it is possible to make filters show with a button on mobile screens and in tablet screens the filters get bellow products, i would like to make them go up top above products…

    #1193376
    Tom
    Lead Developer
    Lead Developer

    Are you wanting to do something like our Niche site in the library?: https://gpsites.co/niche/shop/

    If so, it uses our Off Canvas Panel set to: On

    Then you need to add a new Hook Element with this content:

    <span class="slideout-toggle woo-filter-toggle hide-on-mobile"><a href="#">FILTER</a></span>

    Set the hook to: woocommerce_before_shop_loop

    You’ll also need to check “Execute PHP”.

    Then set the Display Rules to `Product Archive” and “Product Category Archive”.

    Now you’ll need some CSS:

    .woo-filter-toggle {
        padding: 10px 0;
        margin-right: 20px;
        float: left;
        font-size: 14px !important;
        font-weight: 500;
        line-height: 20px;
    }
    
    .woo-filter-toggle a {
        color: #000;
    }
    
    .main-navigation ul li.slideout-toggle {
        display: none !important;
    }
    
    .woo-filter-toggle a:before {
        padding-right: 2px;
        position: relative;
        top: 1px;
    }

    Let me know 🙂

    #1193714
    johnaps

    Yes Tom!! This is exactly what i want!

    I did everything you said, but there seems to be 3 problems that showed up.

    1. the filters button disappears for smaller media bellow 768px
    2. i would want for above 1150px to only show the filters on the left side bar with no filters button to be visible. And bellow 1150px to only show the filters button for the filters (with no filters on the sidebar to be shown)
    3. and last problem because of my customization i guess the button right now opens my superfly menu and not the filters

    Thank you for your time and help, i dont have words for this really!

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