• I have added the below code to functions.php in a hope to use http://www.mysite.com/out/?url=www.google.com but it does not work.

    // use parameters to pass data
    function add_query_vars( $qvars ) {
        $qvars[] = 'url';
        return $qvars;
    }
    // hook add_query_vars function into query_vars
    add_filter( 'query_vars', 'add_query_vars' );

    I have used in my page “out”

    global $wp_query;
    if (isset($wp_query->query_vars['url]))
    {
    echo $wp_query->query_vars['url'];
    }

    when I enter http://www.mysite.com/out/?url=www.google.com in my broweser it says “pageok”.. any help what am I doing wrong here.

The topic ‘url parametes says "PageOK"’ is closed to new replies.