how query string in wordpress receive the value other than post and page

I developing plugin in which i receive the value from query string against specific product and show the result please tell any idea or suggestion .

like” http://localhost/business/?product_id=5

Related posts

Leave a Reply

1 comment

  1. I’m afraid I don’t understand exactly what the problem is so I guess you want just add *product_id* as a query var:

    function my_add_query_vars( $qv = array() ) {
        $qv[] = 'product_id';
        return $qv;
    }
    add_filter( 'query_vars', 'my_add_query_vars' );