As soon as I add a custom query_var using the filter, my pages point to an archive page – why?

I was experiencing a similar problem and traced it back to Yoast’s WordPress SEO plugin. This is a very popular plugin, so I wanted to post my fix. If you are running this plugin, do the following:

  1. Navigate to SEO > Permalinks
  2. Is “Redirect ugly URL’s to clean permalinks” checked?
  3. If so, scroll down to the input field labelled “Other variables not to clean:” and enter the parameter(s) you wish to allow.

That fixed it for me.

Leave a Comment