Forums Forums Search & Filter Pro Href="#" not working in results

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #34814

    Hi.
    I use a search form with results displayed as shortcode. I customized results.php file, everything is working fine except my a href=”#” links 🙁
    These links were used in my template to display further information about each result, but I can’t get them to work now.
    I thought it might be Ajax conflict, so I desactivated it, but it still doesn’t work.
    Thanks for your help
    Séline

    Anonymous
    #34815
    This reply has been marked as private.
    Ross Moderator
    #34908

    Hey Seline

    I’m trying to figure out whats going on.

    It seems like the JavaScript for handling those links is not being loaded.

    Now I’ve tried to see if there are any major differences between the two pages hoping that might give an indication.

    The only things I can see is that page with it working, has the following class on the body: page-template-page-publications-php and page page-id-23

    There is a chance some JavaScript could be targetting a body class first (ie with these), which means on pages without one of these (ie the S&F results page) the JS is not loading.

    There is also a chance, that somewhere higher up in your code you are missing and id / class name, also causing the scripts not to be applied to those results.

    Other than that, perhaps the JS code used to load these sections is hardcoded in to only work on specific pages (automatically set by certain actions in the admin perhaps).

    You will then need to find a way to run the init scripts manually on S&F results.

    To test this theory, you could create a new WP_Query, loop through the results using the same formatting you have used, and see if there is still an issue.

    If so, it means the scripts won’t just work anywhere, but have to be loaded manually somehow.

    Thanks

    Anonymous
    #35110

    Hi Ross.
    Sorry I took time to answer you. I have emailed my template support to ask them if a class or ID was missing as you suggested. And indeed the pub-grid ID was necessary for the links to work. In fact I had voluntarily suppressed this ID because it prevented the filter from working. But after a few modifications in its styling, we could make the ID work with the filter.
    So this topic is resolved thanks to your huge help.
    Thanks a lot for your patience.
    Séline

    Ross Moderator
    #35150

    🙂

Viewing 5 posts - 1 through 5 (of 5 total)