I have search URL that looks like this

/?s=term //this works

But when I click on a pagination link to go to second page I get this

/page/2/?s=term //this gives 404

When I manually enter this URL

/?s=term&paged=2 //this also works

So any idea how to solve this?

  • What are your permalink settings? Do you have any custom rewrite rules (like .htaccess on Apache? Plugins that affect permalinks? A custom post type "page"? – Brooke. Apr 26 '15 at 21:43
  • .htaccess is default for WordPress. I've removed all rewrite rules and flushed rewrite rules. Funny thing it works on localhost but not on dev server. Permalink structure is custom and it's /blog/%postname%/. Although I have CPT with this parameter 'rewrite' => array('slug' => '/', 'with_front' => false) but again it works on localhost – VukBG Apr 27 '15 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.