• Resolved Gabemedia

    (@gabemedia)


    Hi.
    I´m use shortcode and the filter works fine.
    My code in the functions.php is:

    add_action( ‘woocommerce_before_shop_loop’, ‘Gabemedia_storrelser’ );
    function Gabemedia_storrelser() {
    do_shortcode(‘[br_filters attribute=pa_produkt-stoerrelse type=select title=”Vælg din størrelse”]’);
    }

    At first it works fine, but after selecting a “size”-“Størrelser” and the filter loads the products. Then the function is displaying twice ?

    I have no clue, on my test site, it works just fine, and is not duplicating the function.

    Best regards.
    Daniel Svendsen.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi Daniel,

    Please add this code to the plugin settings -> Javascript tab -> After loaded textarea

    
    if(jQuery('.widget.widget_berocket_aapf').next().hasClass('widget_berocket_aapf')){jQuery('.widget.widget_berocket_aapf').next().remove()}
    

    It will remove duplicated element.

    Regards,
    Dima

    Thread Starter Gabemedia

    (@gabemedia)

    Hi Dima.
    There are no field “After loaded textarea”

    Only three:
    Before Update: – On Update: – After Update:

    So I added the code inside the “After update”
    At first, I got an javascript error, after a minut or so, the code worked for me.
    Thank you.

    Best regards.
    Daniel.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Widget duplicates after load’ is closed to new replies.