Adding query string on WordPress permalinks causes 404
-
So this is a support topic I already have the answer to that I’m posting here to hopefully make more visible. I spent a maddening amount of time yesterday trying to figure out why a query string was returning a 404 while using pretty permalinks. I was pre-populating fields on a form from one page to another using Gravity Forms. If I changed the pretty permalinks back to the default Plain, it would work.
Also, as a side note, I found a nested topic about how Yoast SEO might also cause issues here if you have the advanced option “Redirect ugly URLs to clean permalinks. (Not recommended in many cases!)” enabled. So if you’re still running into issues and are using this plugin, check that.
Long story short, I was running into issues with reserved terms. Here is a list:
https://codex.www.ads-software.com/Function_Reference/register_taxonomy#Reserved_TermsUsing name={Name:1} was the reason. I changed both for the sake of sanity to first_name={First Form Name:1}. Change your $_GET variable and field name.
I had to rephrase my searches a lot and dig pretty deep to find the solution, so hopefully I’ll save someone else (likely myself on a future Google quest) a lot of time.
- The topic ‘Adding query string on WordPress permalinks causes 404’ is closed to new replies.