Forums Forums Search & Filter Pro Separate Pages for each category

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #15157

    Hello,

    I’m curious if the following is possible:

    Here it is:

    I have a search set up which shows the 50 U.S. States as results. When someone clicks on a state I need this to take them to that states particular page. Is this possible with this plugin? I have the PRO version.

    Thanks for your time and help!

    Ross Moderator
    #15195

    Hey Brandon

    Sure, I think you just need to use the permalink function in your results template:

    https://codex.wordpress.org/Function_Reference/the_permalink

    Thanks

    Anonymous
    #15257

    Hey Ross thanks for getting back to me. Can you give me an example of how this could look in the results template?

    Thanks!

    Ross Moderator
    #15258

    There are examples at the link which you can add to your results template, inside the The Loop.

    <a href="<?php the_permalink(); ?>">permalink</a>

    Thanks

    Anonymous
    #15259

    Sorry for all the questions, but how am I able to tell the search plugin to go to the specific page?

    Ross Moderator
    #15260

    Ohhh sorry I think I misunderstood,

    So what you are asking is, when a user presses a search they get redirected to a specific page, instead of showing search results?

    Anonymous
    #15261

    Exactly! Is this possible? Would be awesome if so – So it would work almost like a dropdown menu in a way

    Ross Moderator
    #15267

    This is something I’ve not thought about – its not supported, but if you’re comfortable using jQuery you might be able to hack it,

    If you hook in to the submit you could add some custom logic to do stuff, like redirect instead of submitting the form

    $('.searchandfilter').submit(function(e){
        e.preventDefault();
        
        //do stuff
    });

    But I’ve not tried that so you are entering new territory!

    Thanks

    Anonymous
    #15268

    Dang – okay I’m not that good at coding – Thank you for helping me out – where would I put this code? and what would be the code to make this work?

    Sorrrrrrry!

    Ross Moderator
    #15346

    Hey Brandon

    This is not really a solution, but a point in the (possibly) right direction.

    If you are not sure where to place this then I think its safe to say it would be some trouble to code the logic for the rest..

    At this point you’d need to get someone to write some code for your customisations but its a little out of scope of support here.

    Thanks

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