• Resolved jasghar

    (@jasghar)


    Hello, it’s me again, thanks for your previous help. but I got 1 more question for you.
    I’ve an inventory page on website where the listings are shown and there are some filters too to filter the listings.
    plus ! ‘m using a wp search bar with your shortcode below it which shows search terms in the header.
    now what I want is that when the user search in the search bar in header he should be directed to the inventory page with the listings filtered to his search term okay.
    to achieve this I’m using some js like
    on entering click it will change URL with
    domain.com/inventory/search_results= + e.target.val

    so this way I’m able to direct them to the inventory page with listings being filtered with their search term but what is missing is that in search in the header where your search terms are displaying when I click on them it will take me to the posts page with URL being this

    https://valueautosdurango.com/?s=first%2Bsearch

    see not /inventory but to /?s
    can I modify it?

    hope you understand thanks

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hi @jasghar ,

    You should be able to achieve that by changing the get_search_link_no_permastruct method in this gist

    Just change the
    return home_url( '?s=' . urlencode( stripslashes( $search_term ) ) );
    to whatever you need it:
    return home_url( 'inventory/search_results=' . urlencode( stripslashes( $search_term ) ) );

    Just play with this and you should, eventually, achieve what you need.

    Thread Starter jasghar

    (@jasghar)

    thankyou dear, thankyou very much it worked

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    @jasghar Glad I could help!

    Have a great day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add links which i want?’ is closed to new replies.