Trouble getting URL query parameters to work on the home page

[ad_1]

Hello!

Though I’ve coded the use of query parameters in my plugins before, I’ve always used them on sub-pages, only because my shortcodes are usually used on sub-pages. I’ve never tried to utilize my own added query parameters on a site’s home page before. When I specify the ?key=value pair on the home page URL, I get a 404. It works fine on any other page, where I’m able to extract the key and value pair as expected using get\_query\_var().

Is there additional code I need to add to get it working on the home page? (The only addition I made was the query\_vars hook, adding my parameters to the filter list). All my parameters start with “idx\_” to ensure no namespace collision.

Your help is much appreciated!

[ad_2]
1 Comment
  1. The homepage shouldn’t have any difference on the querystring not working. Sounds like there’s a bug in your plugin’s code. Query Monitor might help here, as well as debugging.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer