• Resolved dropsacht

    (@dropsacht)


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Strange, your code works for me with the Twenty Ten theme. Perhaps you have a plugin that is interfering.

    Working properly for me as well. Try deactivating plugins one by one to see if you can find the conflict. Switching to an unmodified default theme is also a good way to check for any theme related conflicts.

    Thread Starter dropsacht

    (@dropsacht)

    Thanks for the advice. I found the reason for the problem. For everyone having a similar problem the plugin “404 Redirect” was the reason for the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Params on wordpress not working’ is closed to new replies.