WordPress complex search query into pretty permalinks

I just wondering if there is a way to convert WordPress complex search query into pretty permalinks.

From what I understand, there is a way to convert:

Read More

www.domain.com/?s=keyword
into
www.domain.com/search/keyword

However, what if you want to change search query complex like:
http://domain.com/?s=+&location=jakarta&radius=1&distance=Miles&slider_search=1&etype=null
into
http://domain.com/search/event-jakarta

Related posts

Leave a Reply

1 comment

  1. yes you can add a rewrite rule using wordpress functions. It involves regex to identify the address given, and then go to the location.

    add_action('init', 'add_rewrite_rule');
    function add_rewrite_rule(){
       add_rewrite_rule('^event-jakarta?','index.php?is_sidebar_page=1&post_type=page','top');
    }
    

    you might need to play around with the regex a bit and the location. IF you google wp rewrite there is a good bit of information.