Support » Plugin: WordPress Meta Data and Taxonomies Filter (MDTF) » Overring slider values

  • Resolved Jeffinho2016


    Hi, I know that this is custom coding and not expecting much, but would like to be pointed to the good direction.

    I have a slider reflecting values between 0 and 15000.

    For a specific page, I would like to override this to 0 and 2000.

    I successfully managed to show it properly on the frontend by editing the get_html_items function like this:

    This code works to some extent. The good values are displayed on the slider. However, it seems that they are passing to mdf_search_terms anyways even if I don’t change these values.
    mdf_search_panel is telling that the filter 0-2000 is activated, which is not the normal behaviour: (this is mdf_search_panel, just with some additional css)

    I’m missing something but I’m not quite sure what.
    Could you point me to some direction?


Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello

    try to create 2 sliders with different max and min

    Meta key of the first slider reflect for the second slider

    hide the slider on different pages is not hard

    Hi, thansk for the reply. Yeah I had that in mind too. Was just hoping for a cleaner solution than just a display:none but I think that’s what is going to be the easier.



    So I did what you said and it simply does not work.
    Here’s what happens.
    I have products of a power that can be between 0 and 2000W

    Now i have pages categorizing these products like 0-500 Watts, 500-1000 Watts, 1000-1500 Watts and 1500-2000 Watts

    Now all these pages now have 5 sliders.
    1 slider that goes from 0 to 2000
    1 slider that goes from 0 to 500
    1 slider that goes from 500 to 1000
    1 slider that goes from 1000 to 1500
    1 slider that goes from 1500 to 2000

    By default, they’re all hidden via css and I only display the one that is relevant to the corresponding page.

    Only the last slider of the list works

    If I go to the “1000-1500” page and click ANY filter (not especially the slider),
    Only the product that has a value of 1500 (and is therefore common to the last 2 categories will display)

    I also tried to create new meta keys so that each slider actually reflects a different meta key (they all have the same value).
    No success whatsoever.
    I click ANY filter, result is either 0 or only the products that do not fit in any slider.
    Tried absolutely everything. Transients, no transients, cache, no cache, uninstall the plugin, reinstall. Put the sliders in ascending order, descending order. Change the name of my own meta keys, change the name of the medafi meta keys.
    Nothing works
    Total waste of time. I’m close to 15 hours work to get these sliders working and nothing happens.

    Finally got it running without having to hide anything.
    Yes I did have to create several sliders for each.
    But they all reflect the same metakey.

    What I did is the following:
    in draw_front_page_items
    I added an extra condition in if ($item[‘type’] == ‘slider’) that will prevent the drawing of the sliders according to the page
    Really unsure is this really is an appropriate way to do it, but at least. My filters now work properly

    (also adjusted the way <tr></tr> are created to envoid the creation of empty rows)



Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Overring slider values’ is closed to new replies.