WordPress.org

Ready to get started?Download WordPress

Forums

Access $_GET parameters after permalink manipulation (4 posts)

  1. mrunseen
    Member
    Posted 1 year ago #

    Hi Everyone,

    I am new to WordPress and am having a heck of time figuring this issue out, so any help would be much appreciated!

    With regards to Permalink Settings, I am using the "Custom Structure": /%year%/%monthnum%/%postname%/

    i.e. myblog.com/2013/02/my-great-post/

    I have a plugin installed to make use of re-captcha on the comment form. When the recaptcha failure takes place, the user is redirected to something like:

    myblog.com/2013/02/my-great-post/?rerror=incorrect-captcha-sol

    However, since the $_GET information is being stripped, I am unable to determine that an error has taken place.

    Any thoughts on how to best preserve the query parameters while maintaining the permalink structure cited above?

    Thanks in advance!

  2. mrunseen
    Member
    Posted 1 year ago #

    Hey Guys,

    I am still having problems with the issue described above. I tried to use "add_filter" to register the query variables, but had no luck.

    e.g.

    add_filter('query_vars', 'parameter_queryvars' );
    
    function parameter_queryvars( $qvars ){
      $qvars[] = 'test';
      return $qvars;
    }

    I am really at a loss here, so any pointers on this matter would be very much appreciated.

    Thank you!

  3. Andrew
    Forum Moderator
    Posted 1 year ago #

    So, this;

    myblog.com/2013/02/my-great-post/?rerror=incorrect-captcha-sol

    Turns into this;

    myblog.com/2013/02/my-great-post/

    ?

  4. mrunseen
    Member
    Posted 1 year ago #

    In the code snippet that I posted, the 'test' is merely a placeholder. I have tried using 'rerror' as well, with no luck.

    EDIT:

    Just saw the "turns into" portion of your reply.

    The query params stay in the URL, however, I can't seem to access them. Not through $_GET or $wp_query.

Topic Closed

This topic has been closed to new replies.

About this Topic