What is appropriate flow for custom data from URL in WP_Query?

Posted by Prem Tiwari | Updated on

What is appropriate flow for custom data from URL in WP_Query?

I think the WP function you are looking for is add_rewrite_tag. It aims to add custom GET params to your URL and include it automatically in query_vars.

For example, you can add the following to the init hook :


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers