Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1196356
    Seontis
    Participant

    Hi,

    Could you help me please to find how should I do to have a filter widget in the shop page like that:
    http://demo.theme.co/shop-integrity/
    https://nimbus.everhelper.me/client/notes/share/593782/cgdi0cxout8ddu2q0g42

    I drives me crazy…

    Thanks for your help

    Vincent

    #1196792
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    They are Woocommerce widgets that you can add to your sidebar. Your page should at least have a main sidebar or custom sidebar, else, it will not display your widgets.

    I like to see your current setup so I can provide some specific recommendations. Would you mind providing your site’s URL? And if it’s behind the coming soon page then please provide your login credentials in private reply as well.

    Thanks!

    #1196974
    Seontis
    Participant
    This reply has been marked as private.
    #1197040
    Lely
    Moderator

    Hi There,

    You do have a Full width setup. Please go to Appearance > Customize > Layout and Design > Content Layout: Choose Content Left, Sidebar Right. Then on Appearance > Widgets > Drag Woocommerce Price Filter widget to your main sidebar.

    You might also want to see this:https://docs.woocommerce.com/document/woocommerce-widgets/

    #1197150
    Seontis
    Participant

    Thanks for your reply. The problem with this solution is the fact that the sidebar appears on all pages. Is it possible to have it only on the shop page and not on the other pages?

    Thanks a lot.

    #1197242
    Paul R
    Moderator

    Hi,

    To achieve that, you can add this in your child theme’s functions.php file.

    
    function x_get_content_layout() {
    
        $content_layout = x_get_option( 'x_layout_content' );
    
        if ( $content_layout != 'full-width' ) {
          if ( is_home() ) {
            $opt    = x_get_option( 'x_blog_layout' );
            $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
          } elseif ( is_singular( 'post' ) ) {
            $meta   = get_post_meta( get_the_ID(), '_x_post_layout', true );
            $layout = ( $meta == 'on' ) ? 'full-width' : $content_layout;
          } elseif ( x_is_portfolio_item() ) {
            $layout = 'full-width';
          } elseif ( x_is_portfolio() ) {
            $meta   = get_post_meta( get_the_ID(), '_x_portfolio_layout', true );
            $layout = ( $meta == 'sidebar' ) ? $content_layout : $meta;
          } elseif ( is_page_template( 'template-layout-content-sidebar.php' ) ) {
            $layout = 'content-sidebar';
          } elseif ( is_page_template( 'template-layout-sidebar-content.php' ) ) {
            $layout = 'sidebar-content';
          } elseif ( is_page_template( 'template-layout-full-width.php' ) ) {
            $layout = 'full-width';
          } elseif ( is_archive() ) {
            if ( x_is_shop() || x_is_product_category() || x_is_product_tag() ) {
              $opt    = x_get_option( 'x_woocommerce_shop_layout_content' );
              $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
            } else {
              $opt    = x_get_option( 'x_archive_layout' );
              $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
            }
          } elseif ( x_is_product() ) {
            $layout = 'full-width';
          } elseif ( x_is_bbpress() ) {
            $opt    = x_get_option( 'x_bbpress_layout_content' );
            $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
          } elseif ( x_is_buddypress() ) {
            $opt    = x_get_option( 'x_buddypress_layout_content' );
            $layout = ( $opt == 'sidebar' ) ? $content_layout : $opt;
          } elseif ( is_404() ) {
            $layout = 'full-width';
          } else {
            $layout = $content_layout;
          }
        } else {
          $layout = $content_layout;
        }
    
         if ( x_is_shop()) {
             $layout = 'content-sidebar';
         }
        return $layout;
    
      }
    

    You may add it after this line

    // Additional Functions
    // =============================================================================

    Hope that helps.

    #1228307
    Seontis
    Participant

    Hi,

    sorry for my late reply and thanks for yours.

    I have tried your solution and it works partially.

    The good part is that I have a sidebar only for the shop page which is good.

    The problems are:

    – the sidebar keep being empty.
    > I have created a specific sidebar for the shop and assignate filters in this sidebar
    > I have selected the layout « left content – sidebar right » for the shop page.
    but I cannot find how to assignate the shop sidebar to the shop page.

    – the sidebar takes all the height of the page instead of just the content part as you will see it here: https://nimbus.everhelper.me/client/notes/share/593782/cgdi0cxout8ddu2q0g42
    Therefore the page is not centered anymore https://nimbus.everhelper.me/client/notes/share/619424/z8shmi0zbia938tp4kwo
    Therefore, the page is not centered anymore in the shop.

    Thanks a lot for your help

    Vincent

    #1228317
    Seontis
    Participant

    PS: may be I could solve the probleme using the variation Integrity instead of Icon?

    #1229247
    Lely
    Moderator

    Hi Vincent,

    Yes, that will work on integrity. By default, sidebar on Icon stack is fixed. Please try using Integrity instead.

  • <script> jQuery(function($){ $("#no-reply-1196356 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>