Forums Forums Search & Filter Pro Search area is not update when category archive loaded by Pjax

Tagged: 

Viewing 4 posts - 11 through 14 (of 14 total)
  • Anonymous
    #45190

    Trevor,
    Don’t remember me…

    Trevor
    #45210
    This reply has been marked as private.
    Ross Moderator
    #45434

    Hey Yoshhiro

    I have just noticed what you mean 🙂

    So, when clicking category archive from this page:

    http://jobboard.yoshihiromizuta.com/jobs/157/

    The page is refreshed, but S&F is not refreshed, so the correct category is not preselected in the form.

    I’m afraid we have no “easy” way to update the search form, but I guess you must run some custom javascript after every page load in your theme.

    So in your theme, you must find an event, which is triggered every time an ajax page load occurs.

    If you can find this, then you must detect the current page, grab the jobs cat from the URL:

    http://jobboard.yoshihiromizuta.com/jobs/jobs_cat<strong>/1/</strong>

    And then manually update S&F form to select the correct cat:

    var jobs_cat = 2; //this should be taken from the URL, when the page update with ajax
    $('.searchandfilter .sf-field-taxonomy-jobs_cat input[type="checkbox"][value="'+jobs_cat+'"]').prop("checked", true);

    To do all this is quite tricky but it is possible.

    Thanks

    Anonymous
    #45451

    Dear Ross

    Thank you!
    I’ll give it a try!!

Viewing 4 posts - 11 through 14 (of 14 total)