• Resolved Rob

    (@roballred)


    I would like to pass a parameter to my template, maybe something like a city name something like this:

    http:\\myhappysite.com\mypagename?city=seattle

    i have added the following to my functions.php so i have a recognized variable

    add_filter(‘query_vars’, ‘parameter_queryvars’ );
    function parameter_queryvars( $qvars ){
    $qvars[] = ‘city’;
    return $qvars;
    }

    I am missing the final step of getting the passed parameter in my template and use it.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘passing parameter to my template’ is closed to new replies.