[resolved] Woocommerce widget, layered nav (5 posts)

  1. iwkse
    Posted 3 years ago #

    Hi all,
    I've been trying to use the layered nav widget without success, so I'm writing here to know if anyone of you have used it and could let it work properly.
    When I just add the widget and save the preferences on the front-end page I see an error like:

    the array $_attributes_array is not an array and the merge_array does not work.

    Error raised at line 56.
    After some investigation I've noticed the woocommerce_layered_nav_init is never executed because the is_active_widget always returns false.
    Even when I try removing the check I can't go too far because I don't get the error but the widget is obviously not displayed.
    So it would be just enough to know this is a common issue because I don't have idea why it should not work.
    Any hints are welcome


  2. TroyDesign.IT
    Posted 3 years ago #

    Hello, i have a similar problem... I have last version of woocommerce(and wordpress) and layered nav widget is displayed but woocommerce_layered_nav_init is never executed and so filters don't work. I had to create another plugin with 2 simple line:
    remove_action( 'init', 'woocommerce_layered_nav_init', 1 );
    add_action( 'init', 'woocommerce_layered_nav_init', 2 );

  3. iwkse
    Posted 3 years ago #

    Hi, I understood the issue. The init is not executed because it's missing a sidebar container for the layered nav. So if you create a sidebar first the nav will show up correctly.

  4. amychin
    Posted 3 years ago #

    I'm incredibly frustrated with this layered nav widget. Maybe it is something I'm doing wrong, but I've set up the attributes, assigned them to products, and put the layered nav widget into the "shop overview page", the page that Woocommerce assigns as the default. All of the other widgets I put there work except the layered nav. It does not show up! I can't seem to find any documentation anywhere that gives a clue as to why this would be. I have read all of the Woocommerce documentation, and searched around. Does anyone know?

    Thanks in advance!

  5. amychin
    Posted 3 years ago #

    P.S. I have a sidebar. I should have mentioned that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic