Support » Fixing WordPress » Search base rewrite

  • martin.kovac

    (@martinkovac)


    Hi,

    I have this code:

    function blog_rewrite_rules(){
        global $wp_rewrite;
    
        $wp_rewrite->search_base = 'my_search/';
        $wp_rewrite->pagination_base = 'my_page/';
        $wp_rewrite->flush_rules();
    }
    add_action('init', 'blog_rewrite_rules');

    pagination base is working fine but search doesn’t. It still generate url like …?s=pattern&submit=Search

    Permalink settings is set to Post name

    What is wrong. Is there some code missing?

    Thank you.

  • The topic ‘Search base rewrite’ is closed to new replies.