Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter Darik

    (@darikk)

    Hi All,

    I have solved this issue myself. Please have a look to my modified code.

    Note : First important thing is that you must write you rewrite rule , filter query var and flush rewrite rule only in plugin activation hook.

    register_activation_hook(__FILE__, “call_rewrite_fun”));

    function call_rewrite_fun() {

    // Filter query var
    init_query_vars();

    // Add rewrite rule
    add_endpoints();

    // Flush
    flush_rewrite_rules();
    }

    you should use template_redirect hook for using get_query_var() function.

    Thanks,
    Darik

Viewing 1 replies (of 1 total)