Params on wordpress not working
-
Hi all,
I am trying to setup a wordpress page which uses parameters but I can’t get the page to read the parameters. Here is what I have done:
1) Setup a page with the following Text (not in the html part of wordpress):<?php global $wp_query; if (isset($wp_query->query_vars['hellow'])) { print $wp_query->query_vars['hellow']; } ?>
2) Setup the following plugin to initiate the variable within wordpress:
add_filter('query_vars', 'parameter_queryvars' ); function parameter_queryvars( $qvars ) { $qvars[] = 'hellow'; return $qvars; }
I am using Permalinks post-name settings and ezPHP.
Here is a list of thinks I have already tried unsuccessfully.
a) Using a link including the ?hellow=test
b) typing in <mypage>/atest/?hellow=test
c) using $_GET[“hellow”] or get_query_var()
d) Updating permalinks
And all different combinations of these approaches.The plugin is working and is added to wordpress, which I know because my site stops working when I used function
parameter_queryvars()
as a function call.
It seems wordpress just takes away those parameters and then they are lost somewhere and I have trouble finding them or their functions. Help would be very much appreciated. I am happy to provide further details if needed.
- The topic ‘Params on wordpress not working’ is closed to new replies.